• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to know the name of the window

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone

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

Thank you for the help.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Nouf Nassri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Frame 1

Action Button1


Action Button2
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic