If I've created a JFrame with 2 JButtons in it. Both buttons call another JFrame through actionPerformed(ActionEvent event)
(so 3 JFrames in total, the main one and the two which are called from it).
I'll name the JFrame with the JButton's main, and the two called JFrame's frame1 and frame2.
I call frame1 from one of the JButton's in main. Then I press the second JButton which calls up frame2.
I want frame1 to be closed automatically when frame2 is called and vice-versa.
I've looked for a solution and not been able to find one but I'm hoping it's fairly simple.
Thanks, help is appreciated.