How can I specify the initial position and size of a Frame/JFrame?
Another (and IMHO better) way of sizing a window is to use the pack() method. This sizes the window so that each of its components are visible at their preferred size.
To set the initial position for a frame (or JFrame), use the setLocation() method specifying a Point object, or the x and y coordinates. The top-left of the screen is at 0,0.
The java.awt.Toolkit class contains the getScreenSize() method for getting the size of the screen - just in case you wish to make the window the full size of the screen or center your window.