java Programming Glossary: window2
Adding JPanels from other classes to the cardLayout http://stackoverflow.com/questions/9322474/adding-jpanels-from-other-classes-to-the-cardlayout init JPanel jp new JPanel new BorderLayout JPanel jp2 new Window2 JPanel jp3 new Window3 JLabel textLabel new JLabel Window1 jp.setBackground.. .add new Window1 Center frame.getContentPane .add new Window2 Center frame.getContentPane .add new Window3 Center frame.setDefaultCloseOperation.. run createAndShowGUI The second window public class Window2 extends JPanel implements ActionListener static CardLayout cardLayout..
|