- /**
- * New Gui/Graphics Demo Applet that uses Swing
elements
- *
- * @author T. K. Rogers
- * @version 1/20/04
- */
- import javax.swing.* ;
- import javax.swing.border.* ;
- import javax.swing.event.* ;
- import java.awt.* ;
- import java.awt.event.* ;
- public class NewGuiGraphicsDemo
extends JApplet {
- private GraphicsDisplay graph = new GraphicsDisplay ( ) ;
- private GuiMenu menuBar ;
- public SouthControlPanel southControlPanel ;
-
- public void init ( ) {
- // Adds a menu bar
- menuBar =
new GuiMenu ( ) ;
- setJMenuBar ( menuBar ) ;
-
- // Sets up a container
object which holds a border layout.
- Container c =
getContentPane ( ) ;
- c.setLayout ( new
BorderLayout ( ) ) ;
-
- c.add ( graph,
BorderLayout.CENTER ) ; // Adds a graphic display to
- // the center of the layout.
-
- // Adds a control
panel from the SouthControlPanel class at the bottom.
- southControlPanel =
new SouthControlPanel ( ) ;
-
c.add ( southControlPanel,BorderLayout.SOUTH ) ;
- }
- }