|
|
Example applet creating a frame
The following applet will create a separate, frame
window, apart from the applet window:
import java.applet.Applet;
import java.awt.*;
public class Frame1 extends Applet
{
public Frame1()
{
Frame myFrame = new
Frame("A frame created by an applet");
myFrame.setSize( 300, 200 );
myFrame.show();
}
} // class
As
with the menu frame example, since no code has been written to deal with
actions, you cannot close this frame window. However, when you close the applet
window, the frame object will be destroyed and its window removed.
|
|