Preventing Jframe from being moved on screen

Asked

Viewed 215 times

0

I have a frame in java , and it is in the middle of the screen. I don’t want it to be moved to other screen locations like I would to set it ?

1 answer

1

Moving windows is the window manager, if you remove the title bar, it will make it difficult to move, although it is still possible in other ways (in linux for example, some task managers allow you to do this with the key ALT). This is the same approach used in these open/load screens of applications like Eclipse and Intellij.

So, if it is possible to leave your APP without title bar, do:

jFrame.setUndecorated(true);

I don’t know any other way.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.