• Post Reply Bookmark Topic Watch Topic
  • New Topic

Moving between multiple "windows" in JFrame

 
Ryan Smith
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to simulate in my JFrame that when an actionEvent is received the window interface changes. Is this better accomplished by removing all of the buttons and repopulating it with new ones or opening a new JFrame with the buttons I want?

I don't need any fields/values from the first window...

thanks guys!
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I would do is put all your different interfaces on a JPanel. Then all you would need to do is remove and add whatever JPanel you need to the JFrame.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!