I am developing an application in Netbeans. I am facing a problem with the implementation. When I click on a button in the 1st window, it should open a new sub window. At the same time, the main window should be disabled. No button should be active. But when the sub window is closed, the main window should be enabled again. The problem is at the last step. I'm not able to re-activate the main window.. Please help me..