アットウィキロゴ

ぶとあ

import java.awt.*;
import java.awt.event.*;

class pro extends Frame {
public static void main(String[] args) {
pro frame = [[new]] pro("pro");
}

public pro(String str) {
super(str);
setSize(500, 500);
setLayout(new FlowLayout());
Button button = new Button("click!");
button.addActionListener(new beck());
add(button);
setVisible(true);
       addWindowListener(new stopwin());
}

class stopwin extends WindowAdapter{
  public void windowClosing(WindowEvent we){System.exit(0);} 
  } 

class beck implements ActionListener {
public void actionPerformed(ActionEvent e) {
	System.out.println("beck");
}
}
}
最終更新:2010年09月28日 16:01