|
-
June 18th, 2005, 08:43 PM
#1
Custom Modal Dialog Window
Im currently making a game. When the user clicks a menu item i have it open a new window which asks for a username, password, and has two buttons, cancel and connect. How can i have it be a modal window (I want the user to handle the window before focus is shifted back to the main window)?
-
June 21st, 2005, 05:50 AM
#2
Re: Custom Modal Dialog Window
U can use the JDialog constructor as shown below :-
JDialog(owner, title, isModal)
Ex:
JDialog dialog = new JDialog(null, "A Modal Dialog", true)
If u specify 'true' for the third argument , the dialog becomes modal.
then call
dialog.show();
from the Menu click event.
All the best!! Happy coding......
-
June 21st, 2005, 11:32 AM
#3
Re: Custom Modal Dialog Window
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|