This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception: wrong parent for CardLayout

 
Allen Bandela
Ranch Hand
Posts: 128
Eclipse IDE MS IE Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
I am creating a GUI for an application. I am setting the frame with CardLayout. But, I am getting runtime exception "java.lang.IllegalArgumentException: wrong parent for CardLayout"
while executing the cardLayout.show(Container parent, Object constraints) method. I made sure the parent was the one which has the card layout set to it. Please help.
The program is below.
public class LoginGUI implements ActionListener{
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LoginGUI.this.exams
should be
LoginGUI.this.exams.getContentPane()
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic