![]() |
![]() |
![]() |
![]() |
![]() |
|
The program shown in Segment 702 has the following structure:
import java.awt.event.*;
public class application name extends JFrame{
public static void main (String argv []) {
new application name ();
}
public application name () {
// Call superclass constructor
// Establish window size
// Create and connect class instances
// Show the window
}
// Define inner classes
}
In the program shown in Segment 702, there are no class
instances other than instances of the MovieApplication and the
LocalWindowListener, so there is not much to connect. Nevertheless,
both that program and the structure shown in this segment illustrate the
following extremely
common characteristics:
JFrame class.
main method launches the application by creating an instance
of the application class.