日期:2014-05-20 浏览次数:20984 次
import java.io.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
public class jishiben {
private Frame f;
jishiben(){
init();
}
public void init(){
f=new Frame("记事本");
f.setBounds(300,100,600,500);
f.setLayout(new FlowLayout());
myEvents();
f.setVisible(true);
}
public void myEvents(){
f.addWindowListener(new WindowAdapter()
{
public void WindowClosing(WindowEvent e){
System.exit(0);
}
});
}
public static void main(String[] args) {
new jishiben();
}
}