Hello guys, i have a question regarding how to change the origin of a window, particularly a JFrame.

I'm essentially running a program called "Fraps" to see the frames per second of my JFrame, with this program, you can display the fps on any 4 corners of the window currently on focus, however, my problem is that if i choose to display the fps on the top left or right of the window, it overlaps the information tab or whatever (the bar that displays the name of the process and minimize/exit buttons) so the fps display becomes nearly invisible.

There's a cheap way to fix this, I could simply make the JFrame undecorated, but that will make the moving of the window on the monitor impossible, so I don't want to go this route.

I'm thinking that if i can change the origin of the screen to be 0 + the inset of the information bar's width and 0 + the inset of the information's bar height, this problem may be resolved.

Any ideas on this issue? Thank you guys for your time.

Edited 4 Years Ago by thanatos1

Are you asking about the location of a window on the monitor? There are methods for setting the location.

Please explain what you are trying to do. What component is inside the JFrame that you are trying to change the position of?

Click Here

Click Here

these 2 images should explain it better than I can, basically, i want the second picture's fps display to look like the first one, but below the information bar.

in the first picture, the window is undecorated, which is why there's no problem there.

Edited 4 Years Ago by thanatos1

Is the "fps display" a component like a JPanel that you want to change the location of in a container like a frame?
Can you make a small simple program that compiles and executes and shows the problem?

This article has been dead for over six months. Start a new discussion instead.