30-07-2009, 09:31 PM
If your looking for the easy solution to centering just...
I doubt it will center it on the primary monitor but it's better than coke's default approach
.
Code:
JFrame myFrame;
// Add controls...
myFrame.pack();
myFrame.setLocationRelativeTo(null);
