import java.applet.Applet; import java.awt.*; public class Paigutus extends Applet{ Choice c=new Choice(); List l=new List(); Button b=new Button("OK"); Button b2=new Button("Nupp 2"); Panel p1=new Panel(); public void init(){ setLayout(new BorderLayout()); p1.setLayout(new GridLayout(1, 2)); p1.add(b); p1.add(b2); add(p1, BorderLayout.NORTH); c.add("1"); c.add("2"); add(c, BorderLayout.SOUTH); Panel p2=new Panel(); p2.setLayout(new GridLayout(2, 1)); for(int nr=1; nr<=100; nr=nr+1){ l.add(""+nr*nr); } p2.add(l); Panel p3=new Panel(); p3.setLayout(new GridLayout(5, 6)); for(int i=1; i<=30; i++){ p3.add(new Button(""+i)); } p2.add(p3); add(p2, BorderLayout.CENTER); } }