I am actually working on a java project which shows many frames, and when we click on a button then we go to the appropriate frame … the problem is that the first frame always stays visible.
I have tried f1.setVisible(false); in the action performed, but the same problem persist.
Upon opening a new frame, also call a method which closes your window