0

Hello all,

can anyone tell me how to make a JFrame fixed, by not allowing user to drag it somewhere else in the window? like doking the JFrame in the screen, also disallow user to resize it.

Thanks.

4
Contributors
5
Replies
10
Views
7 Years
Discussion Span
Last Post by amit.hak50
0

@amit.hak50 you better read original question and not to take very first google result that pop-ups on you. Otherwise you wouldn't suggest method that deals with layout instead of positioning...

http://java.sun.com/javase/6/docs/api/java/awt/Frame.html#setUndecorated(boolean)

public void setUndecorated(boolean undecorated)

Disables or enables decorations for this frame. This method can only be called while the frame is not displayable.

Edited by peter_budo: n/a

0

@peter
I understand the question ..

do
this.setResizable(false);
this.setUndecorated(false);

you can't able to resize it and can able to move it ..i thin now you got it ...

and well ..i don't use google much ..it finishes your intelligency

Edited by amit.hak50: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.