posted 12 years ago
Hello,
What is the best way to code a swing application that has two windows where the first window has a button that creates the second window?
I've attached the code. You'll notice I'm creating the second window from the button handler on lines 42 and 53-48. Maybe this is the wrong way to generate a second window from a button?
On line 92, I'm trying to dispose the second window upon clicking the "Close" button. However, nothing happens when the "Close" button is clicked. I've also tried the setVisible(false) method, but get the same results.
Thanks for any help.