All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Window | +----java.awt.Frame | +----Acme.MainFrame
Using this class you can add a trivial main program to any Applet and run it directly, as well as from a browser or the appletviewer. And unlike some versions of this concept, MainFrame implements both images and sound.
Sample main program:
The only methods you need to know about are the constructors.public static void main( String[] args ) { new Acme.MainFrame( new ThisApplet(), args, 400, 400 ); }
You can specify Applet parameters on the command line, as name=value. For instance, the equivalent of:
would just be:<PARAM NAME="pause" VALUE="200">
You can also specify three special parameters:pause=200
width=N Width of the Applet. height=N Height of the Applet. barebones=true Leave off the menu bar and status area.
Fetch the software.
Fetch the entire Acme package.
public MainFrame(Applet applet, String args[], int width, int height)
public MainFrame(Applet applet, String args[])
public MainFrame(Applet applet, int width, int height)
public boolean handleEvent(Event evt)
public void run()
public boolean isActive()
public URL getDocumentBase()getCodeBase
public URL getCodeBase()getParameter
public String getParameter(String name)appletResize
public void appletResize(int width, int height)getAppletContext
public AppletContext getAppletContext()getAudioClip
public AudioClip getAudioClip(URL url)getImage
public Image getImage(URL url)getApplet
public Applet getApplet(String name)getApplets
public Enumeration getApplets()showDocument
public void showDocument(URL url)showDocument
public void showDocument(URL url, String target)showStatus
public void showStatus(String status)
All Packages Class Hierarchy This Package Previous Next Index
ACME Java ACME Labs