setLayout(new CardLayout()); add("flow", create(new FlowLayout())); add("border", create(new BorderLayout())); add("grid", create(new GridLayout(2, 2)));
Panel p = new Panel(); p.setLayout(layout); p.add("North", new Button("this")); p.add("West", new Button("is")); p.add("South", new Button("a")); p.add("East", new Button("test")); p.add("Center", new Button("applet")); return p;