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{
Life is like a day. If the day is of no use, neither a month or a year.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
LoginGUI.this.exams should be LoginGUI.this.exams.getContentPane()