Java Code for my Program

Asked By 10 points N/A Posted on -

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..

Best Answer by Chung Opi
Best Answer
Best Answer
Answered By 5 points N/A #99112

Java Code for my Program


In programming language you can do many different things and also create frame. Just go to this link and try this code, hope you will able to have frame on the center of screen, In creating frame take care of the dimension in your code, you can do this as you desire. Along with the frame option you can also find the other options on this link.

Try this link, you want to know each and every thing about the frame in java language. It will help you in creating different types of frame and dialog boxes. Hope you come up with the solution.

Answered By 0 points N/A #195421

Java Code for my Program



Hi Aldiaz,
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.

Login/Register to Answer

Related Questions