import java.applet.Applet; import java.awt.*; public class SingleApplet extends Frame { Applet theApplet; public static void main(String[] args) { SingleApplet ma = new SingleApplet(); ma.resize(400,200); Panel p1 = new Panel(); p1.setLayout(new BorderLayout()); ma.launchApplet(p1); ma.add("Center", p1); ma.show(); } public SingleApplet(String s) { super(s); } public SingleApplet() { this("Single Applet"); } void launchApplet(Container c) { theApplet = new Clock2(); // theApplet = new HelloWorldApplet(); c.add("Center", theApplet); theApplet.init(); theApplet.start(); // theApplet.show(); } } class SizePanel extends Panel { public Dimension minimumSize() { return new Dimension(100, 100); } public Dimension preferredSize() { return new Dimension(150, 150); } }