I have 3 frames Fe1, Fe2 and Fe3 The first frame contains two buttons Button 1 << view Fe2 "and button 2 <<viewr Fe2>>
I like when I click a button1 it should check if the frame f3 is active when f3 is active then it must close f3 and display frame f2 and the reverse for button 2
Hi,
have you created any code and faced with problems? if so let us know what's the problem and we'll help you...
By the way with the informations you gave, by looking at (J)Frame's documentations, i would simply suggest you the method
or if you mean something more than just visibility, the methods or
So you can check the status of any frame by these methods and do what you want by means of another methods in JFrame: or
bes of luck
Esmaeil Ashrafi
I'm really tired of being engaged with stuff other than Java and programming
You can simplify and clarify that:Then simplify further:In fact, you don't even need the 'if' statement - it's OK to call setVisible(true/false) on the frame whether it's visible or not:
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens: