FileDocCategorySizeDatePackage
DemoApplet.javaAPI DocExample2457Wed Apr 19 11:19:02 BST 2000None

DemoApplet

public abstract class DemoApplet extends Applet implements ActionListener

Fields Summary
private Button
demoButton
private Frame
demoFrame
Constructors Summary
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent e)

    String arg = e.getActionCommand();
    if (arg.equals("Demo")) {
      demoButton.setLabel("loading");
      if (demoFrame == null) {
	demoFrame = createDemoFrame(this);
	showDemo(demoFrame);
      }
      demoButton.setLabel("Demo");
    }
  
public abstract java.awt.FramecreateDemoFrame(DemoApplet applet)

public voiddemoClosed()

        demoFrame = null;
    
public voidinit()

        setBackground(Color.white);
        demoButton = new Button("Demo");
	demoButton.addActionListener(this);
        demoButton.setBackground(Color.yellow);
        add( demoButton );
    
public static voidshowDemo(java.awt.Frame demoFrame)

        demoFrame.setSize(550,500);
        demoFrame.show();