Hi. I have an issue. That's given a snippet of class.

public constructor () // the start of constructor
 JPanel courseChooserPanel = new JPanel(card);  

 CardLayout card = new CardLayout();  
 Department comp = Department.get("COMP");                               // refers to another class
        CourseChooser compPanel = new CourseChooser(this,comp); // refers to another class
        courseChooserPanel.add(compPanel, COMP); 
}// the end of constructor

Why " card.show(courseChooserPanel,"compPanel"); " does not work; it does not produce any output. There is no error too.