import java.awt.*;
import java.awt.event.*;
class pro0304 extends Frame {
public static void main(String[] args) {
pro0304 frame = new pro0304("pro0303");
}
public pro0304(String str) {
super(str);
setSize(500, 500);
setLayout([[new]] FlowLayout());
Button button = new Button("click!");
button.addActionListener(new baction());
add(button);
setVisible(true);
addWindowListener(new stopwin());
}
class stopwin extends WindowAdapter{
public void windowClosing(WindowEvent we){System.exit(0);}
}
class baction implements ActionListener {
public void actionPerformed(ActionEvent e) {
System.out.println("hhhhhh");
}
}
}
最終更新:2010年09月19日 01:18