Exemplo n.º 1
0
        /**
         * Main program (used when run as application instead of applet).
         */
        public static void main(String[] args)
        {
            DelaunayAp applet = new DelaunayAp();              // Create applet

            applet.init();                                     // Perform applet initialization
            JFrame dWindow = new JFrame();                     // Create window

            dWindow.setSize(700, 500);                         // Set window size
            dWindow.setTitle("Voronoi/Delaunay Window");
            // Set window title
            dWindow.getContentPane().setLayout(new BorderLayout());
            // Specify layout manager
            dWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // Specify closing behavior
            dWindow.getContentPane().add(applet, "Center");
            // Place applet into window
            dWindow.setVisible(true);                          // Show the window
        }
Exemplo n.º 2
0
		/**
		 * Main program (used when run as application instead of applet).
		 */
		public static void main(String[] args)
		{
			DelaunayAp applet = new DelaunayAp();  // Create applet
			applet.init();                         // Perform applet initialization
			JFrame dWindow = new JFrame();         // Create window
			dWindow.setSize(700, 500);             // Set window size
			dWindow.setTitle("Voronoi/Delaunay Window");
			// Set window title
			dWindow.getContentPane().setLayout(new BorderLayout());
			// Specify layout manager
			dWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			// Specify closing behavior
			dWindow.getContentPane().add(applet, "Center");
			// Place applet into window
			dWindow.setVisible(true);              // Show the window
		}