Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java ´°¿Ú¹Ø±ÕµÄÁùÖÖ·½·¨

1.ʹÓÃJFrameµÄenableEventsºÍprocessWindowEvent
//Frame1.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Frame1 extends JFrame {
  public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame1");
  }
  protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }
}
2.Ö±½ÓʵÏÖWindowListener½Ó¿Ú
//Frame1.java
import java.awt.*;
import java.awt.event.*;
public class Frame1 extends Frame implements WindowListener {
  public Frame1() {
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame1");
    this.addWindowListener(this);
  }
  public void windowClosing(WindowEvent windowEvent) {
    System.exit(0);
  }
  public void windowOpened(WindowEvent windowEvent) {  }
  public void windowClosed(WindowEvent windowEvent) {  }
  public void windowIconified(WindowEvent windowEvent) {  }
  public void windowDeiconified(WindowEvent windowEvent) {  }
  public void windowActivated(WindowEvent windowEvent) {  }
  public void windowDeactivated(WindowEvent windowEvent) {  }
}
3.Ö±½Ó¼Ì³Ð´°ÌåÊÊÅäÆ÷WindowAdapter
//Frame1.java
import java.awt.*;
import java.awt.event.*;
public class Frame1 extends  WindowAdapter {
  public Frame1() {
    Frame f=new Frame();
    f.setSize(new Dimension(400, 300));
    f.setTitle("Frame1");
    f.addWindowListener(this);
    f.setVisible(true);
  }
  public static void main(St


Ïà¹ØÎĵµ£º

µ¶Ê¯Í·²¼ÓÎÏ· java°æ

import java.util.Scanner;
public class Game{
  void welcome(){
   println("»¶Ó­À´µ½¼ôµ¶Ê¯Í·²¼ÓÎÏ·");
  }
 Choice getUserChoice(){
  println("ÇëÑ¡Ôñ\t[1]¼ôµ¶\t[2]ʯͷ\t[3]²¼");
  Scanner sc= new Scanner(System.in);
  int userCh ......

javaÖеķ´Éä»úÖÆ

Ò»¡¢Ê²Ã´ÊÇ·´É䣺
·´ÉäµÄ¸ÅÄîÊÇÓÉSmithÔÚ1982ÄêÊ×´ÎÌá³öµÄ£¬Ö÷ÒªÊÇÖ¸³ÌÐò¿ÉÒÔ·ÃÎÊ¡¢¼ì²âºÍÐÞ¸ÄËü±¾Éí״̬»òÐÐΪµÄÒ»ÖÖÄÜÁ¦¡£ÕâÒ»¸ÅÄîµÄÌá³öºÜ¿ìÒý·¢Á˼ÆËã»ú¿ÆѧÁìÓò¹ØÓÚÓ¦Ó÷´ÉäÐÔµÄÑо¿¡£ËüÊ×Ïȱ»³ÌÐòÓïÑÔµÄÉè¼ÆÁìÓòËù²ÉÓÃ,²¢ÔÚLispºÍÃæÏò¶ÔÏó·½ÃæÈ¡µÃÁ˳ɼ¨¡£ÆäÖÐLEAD/LEAD++ ¡¢OpenC++ ¡¢MetaXaºÍOpenJavaµÈ¾ÍÊÇ»ùÓÚ·´ ......

javaÃæÊÔÌâ

JAVAÃæÊÔÌ⼯- -
»ù´¡ÖªÊ¶£º
1.C++»òJavaÖеÄÒì³£´¦Àí»úÖƵļòµ¥Ô­ÀíºÍÓ¦Óá£
µ±JAVA³ÌÐòÎ¥·´ÁËJAVAµÄÓïÒå¹æÔòʱ£¬JAVA
ÐéÄâ»ú¾Í»á½«·¢ÉúµÄ´íÎó±íʾΪһ¸öÒì³£¡£Î¥·´ÓïÒå¹æÔò°üÀ¨2ÖÖÇé¿ö¡£Ò»ÖÖÊÇJAVAÀà¿âÄÚÖõÄÓïÒå¼ì²é¡£ÀýÈçÊý×éϱêÔ½½ç,»áÒý·¢
IndexOutOfBoundsException;·ÃÎÊnullµÄ¶ÔÏóʱ»áÒý·¢NullPointerExcepti ......

Lucene£º»ùÓÚJavaµÄÈ«ÎļìË÷ÒýÇæ¼ò½é


LuceneÊÇÒ»¸ö»ùÓÚJavaµÄÈ«ÎÄË÷Òý¹¤¾ß°ü¡£
»ùÓÚJavaµÄÈ«ÎÄË÷ÒýÒýÇæLucene¼ò½é£º¹ØÓÚ×÷ÕߺÍLuceneµÄÀúÊ·
È«ÎļìË÷µÄʵÏÖ£ºLueneÈ«ÎÄË÷ÒýºÍÊý¾Ý¿âË÷ÒýµÄ±È½Ï
ÖÐÎÄÇзִʻúÖƼò½é£º»ùÓÚ´Ê¿âºÍ×Ô¶¯ÇзִÊËã·¨µÄ±È½Ï
¾ßÌåµÄ°²×°ºÍʹÓüò½é£ºÏµÍ³½á¹¹½éÉܺÍÑÝʾ
Hacking Lucene£º¼ò»¯µÄ²éѯ·ÖÎöÆ÷£¬É¾³ýµÄʵÏÖ£¬¶¨ÖƵÄÅÅÐò£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ