java Programming Glossary: jp2
How to show different cards in a CardLayout? http://stackoverflow.com/questions/10823382/how-to-show-different-cards-in-a-cardlayout implements ActionListener Ref private JPanel cardPanel jp1 jp2 buttonPanel private JLabel jl1 jl2 private JButton btn1 btn2.. new JPanel cardPanel.setLayout cardLayout jp1 new JPanel jp2 new JPanel jl1 new JLabel Card 1 jl2 new JLabel Card 2 jp1.add.. jl1 new JLabel Card 1 jl2 new JLabel Card 2 jp1.add jl1 jp2.add jl2 cardPanel.add jp1 1 cardPanel.add jp2 2 btn1 new JButton..
Adding JPanels from other classes to the cardLayout http://stackoverflow.com/questions/9322474/adding-jpanels-from-other-classes-to-the-cardlayout void init JPanel jp new JPanel new BorderLayout JPanel jp2 new Window2 JPanel jp3 new Window3 JLabel textLabel new JLabel.. BorderLayout.EAST setLayout cardLayout add jp string add jp2 string add jp3 string public void actionPerformed ActionEvent..
|