...

View Full Version : locking a window in Java Swing



kuskyboy
04-07-2005, 01:52 PM
Is there a way to lock a window in java swing, what i simply mean is i have a small GUI that appears in front of a larger one, and i dont want the user to be able to click anywhere else untill they have finished with the smaller gui.

hope this makes sense.

thanks in advance
kusky

JPM
04-07-2005, 04:02 PM
Small dialog windows are modal (they block all other windows), but Im not sure about regular windows.

link (http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html#overview)

smeagol
04-07-2005, 04:31 PM
Yeah, use JDialog instead of JFrame for the smaller window. Then pass the owner JFrame to the JDialog constructor.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum