One way to do it is by calling the method that will return the screen size with current monitor settings. The method is in the window class so any frames or windows can use it. You can access from your main frame by
Dimension wndSize = mainFrame.getToolkit().getScreenSize();
The method getToolkit() returns a Toolkit object that has many useful methods in it, getScreenSize() being one of them. getScreenSize returns a Dimension object, so to center a 400 X 400 frame do this
mainFrame.setBounds(wndSize.width/2-200, wndSize.height/2-200, 400, 400);
------------------
I hope its helps, feel free to email me
noahcarroll@juno.com [This message has been edited by Noah Carroll (edited January 24, 2001).]