import java.awt.*;
class AwtDemo
{
public static void main(String[] args)
{
Frame f = new Frame("my awt");
f.setSize(600,400);
f.setLocation(200,100);
f.setLayout(new FlowLayout());
Button b = new Button("我是按钮");
f.add(b);
f.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.out.println("guan");
System.exit(0);
}
});
f.setVisible(true);
}
}
错误提示:
怎么可能找不到?怎么可以找不到?
|