Your Computer Science Resource

Posts Tagged ‘screen’

Jun
9th

HOW-TO: Center a JFrame On The Screen

If you want to add a nice touch to your GUI application, center your window on the screen. Not only does this looks much better than having it start up in the default (0, 0) location, but it takes very little coding effort to make this happen. Fortunately for us, there are two methods for doing this, depending on which version of Java you are using. I will show you how to do it both ways.

(more…)