N/APosted on - 04/01/2012
Hi there JAVA Experts.
I really need your help so that I can finished my program today.
I want to display the Frame I created at the center of the monitor after opening it.
Does anyone have a code for this..?
I really need it ASAP..
Java Code for my Program
You can use any of the below code snipet to display the frame you created in the centre of the screen.
// This means we can set the location of the frame relative to any other frame or window etc. Null means it will be placed in the centre of the screen and is relative to no other component
// This means setting the location as X and Y coordinates. [screenWidth-frameWidth)/2] will give you the centre coordinate of X and [screenHeight-frameHeight)/2] will give you centre coordinate of screen Y
Hope it helps.