gistfile1.txt import java.awt.*;public class GridLayoutTest { public static void main(String[] args) { Frame f = new Frame("计算器"); Panel p1 =new Panel(); p1.add(new TextField(30)); f.add(p1); Panel p2 =new Panel(); p2.setLayout(new Gr
import java.awt.*;
public class GridLayoutTest {
public static void main(String[] args) {
Frame f = new Frame("计算器");
Panel p1 =new Panel();
p1.add(new TextField(30));
f.add(p1);
Panel p2 =new Panel();
p2.setLayout(new GridLayout(3,5,4,4));
String [] name = {"0","1","2","3","4","5","6","7","8","9","+",
"-","*","/","."};//向Panel添加十五个按钮
for(int i =0;i
