import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;

/**
 * This class defines the main() routine for an application
 * that simply opens a window containing a panel of type
 * BallPenPanel, along with its menu bar.
 */
public class BallPen {
	
	public static void main(String[] args) {
		JFrame window = new JFrame("Ball Pen");
		BallPenPanel content = new BallPenPanel();
		window.setContentPane(content);
		window.setJMenuBar(content.createMenuBar());
		window.pack();
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		window.setLocation( (screenSize.width - window.getWidth())/2, 
				(screenSize.height - window.getHeight())/2 );  // center the window on the screen
		window.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);  // User must use "Quit" command to quit.
		window.setVisible(true);
	}

}

