import java.applet.Applet;
import java.awt.*;

// A variation of a class that appears in Core Web
// Programming from Prentice Hall. May be freely used
// or adapted.
// 1998 Marty Hall, http://www.apl.jhu.edu/~hall/java/

/** A class that runs as an applet or an application. */

public class DualUse extends Applet {

  /** The main method is ignored by applets. */

  public static void main(String[] args) {
    Frame mainFrame = new CloseableFrame("DualUse");
    DualUse app = new DualUse();
    app.init();
    app.start();
    mainFrame.setSize(420,120); // Match <APPLET> values
    mainFrame.add(app, BorderLayout.CENTER);
    mainFrame.setVisible(true);
  }

  public void paint(Graphics g) {
    Font font = new Font("Serif", Font.BOLD, 60);
    g.setFont(font);
    g.drawString("DualUse Applet", 0, 70);
  }
}
