Handling Two JFrames
I have a JFrame with a button on it. I want a second Jframe to appear when the user clicks on the button. Also the first Jframe should be inactive while the second Jframe is displayed and it should be re-enabled when the user closes the second Jframe. Second Jframe should be always displayed on top of the first Jframe.
I know how to do this in C#. Can anybody tell me the Java way of doing this? I would appreciate some example code segments as well.
Check JDialog class. It can be used as the second frame you described when you specify its parent as the first JFrame.
Thanks for the tip. It directed me in the right direction. So for all folks out there here's how to do this.
The second form should extend the JDialog class.
Then call the setModalityType() method on the second form with the Application_Modality parameter.