import javax.swing.*; /** * Simple display system with menu control. * * @author Bob Futrelle * @version 0.1, 19 January 2003 * * Demonstrates displaying rectangles and ovals of random * size and position under menu control. * Also shows how to separate menu module from the driver * and the drawing itself. * (first compile 1/19, 7:35am) */ class ShowRectOval { int height, width; { height = 600; width = 800; } RectOvalDrawer drawer; RectOvalGUI gui; ShowRectOval() { } void quit() { System.exit(0); } public static void main(String[] args) { if (System.getProperty("mrj.version")!=null) System.setProperty("apple.laf.useScreenMenuBar","true"); ShowRectOval show = new ShowRectOval(); show.setup(); } // main() void setup(){ JFrame frame = new JFrame(); gui = new RectOvalGUI(width, height); drawer = new RectOvalDrawer(); gui.setup(frame, drawer); } } // class ShowRectOval