|
-
September 13th, 2008, 10:56 AM
#1
Spawn new window on button click: how?
How do I do that? I have a button that when clicked shows up another window, and the previous window will close. Upon closing the new window shall the previous window be brought back again.
Can NetBeans help in creating those kinds of applications?
-
September 13th, 2008, 11:28 AM
#2
Re: Spawn new window on button click: how?
You have setVisible(...) which takes a boolean param, so set the previous window not visible, have the noew Window grab focus, and give the code which handles these windows a WindowListener / WindowAdapter that will detect when the new window closes. Upon closing set the old window visible again.
-
September 13th, 2008, 04:05 PM
#3
Re: Spawn new window on button click: how?
NetBeans can help construct the JFrames and JDialogs, but I don't think it will automate what you are trying to do. Regardless if it did or not, you don't want the tool to be hindering the learning. Go to the Sun Swing tutorials and read all you can about JFrames and JDialogs (and everything else!). Good luck.
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
|