帮忙看看这个程序注释的那句问什么加上就错误了!
import java.awt.*;public class BorderLayout
{
public static void main(String args[])
{
Frame f=new Frame("我的窗体");
Panel p[]=new Panel[5];
for(int i=0;i<=4;i++)
{p[i]=new Panel();}
p[0].setLayout(null);
p[0].setLayout(new GridLayout(1,10,5,5));
p[1].setLayout(new FlowLayout(FlowLayout.LEFT));
p[4].setLayout(new FlowLayout(FlowLayout.RIGHT));
p[3].setLayout(new FlowLayout(FlowLayout.CENTER));
//p[2].setLayout(new BorderLayout());
Button bt[]=new Button[9];
for(int i=0;i<=8;i++)
{bt[i]=new Button(Integer.toString(i));}
p[4].add(bt[0]);
p[4].setSize(100,100);
p[1].add(bt[1]);
p[1].setSize(100,100);
p[2].add(bt[2]);
p[2].setSize(100,100);
p[3].add(bt[3]);
p[3].setSize(100,100);
p[0].add(bt[4]);
p[0].add(bt[5]);
p[0].add(bt[6]);
p[0].add(bt[7]);
p[0].add(bt[8]);
p[0].setSize(100,100);
f.setSize(500,300);
p[0].setBackground(Color.blue);
p[1].setBackground(Color.yellow);
p[2].setBackground(Color.cyan);
p[3].setBackground(Color.green);
f.setBackground(new Color(255,0,0));
f.add(p[0],"South");
f.add(p[1],"North");
f.add(p[2],"West");
f.add(p[3],"East");
f.add(p[4],"Center");
f.setLocation(100,100);
f.setVisible(true);
}
}