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?
Printable View
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?
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.
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.