This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

There's got to be an obivous solution....  RSS feed

 
Ed Kozek
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got an application that uses a main JFrame. In its constructor it creates and displays an instance of JPanel1. From the ActionPerformed method in JPanel1, I want to display an instance of JPanel2 in the main JFrame (and make invisible the instance of JPanel1). I can't use getContentPane().add in the JPanel1 class because this is a method of JFrame, not JPanel.
I must just be thinking of this in the wrong way. What's the best way to do this? Thanks SO MUCH!!!
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!