有个错误.21行.但是我不知道怎么改.
我看不出来哪错了...
各位大哥帮帮忙
import java.awt.*;
import java.awt.event.*;
public class Ziti
{
public static void main(String[] args)
{
Frame f=new Frame("字体改变大小");
f.setSize(400,400);
f.setLocation(100,100);
f.setBackground(Color.red);
f.setLayout(new FlowLayout());
Button b1=new Button("确定");
Button b2=new Button("取消");
f.add(b1,"West");
f.add(b2,"East");
f.addWindowListener(new Shijian());
f.show();
}
}
class Shijian implements WindowListener
{
public void windowOpened(WindowEvent e)
{
}
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
public void windowClosed(WindowEvent e)
{
}
public void windowIconified(WindowEvent e)
{
}
public void windowActivated(WindowEvent e)
{
}
public void windowDeactivated(WindowEvent e)
{
}
}