CardLayout (2)

Flip through Btn1 - Btn4 circularly

public class TestCardLayout extends Frame {
   TestCardLayout()
   {
      setLayout(new CardLayout());

      add(new NextButton("Btn 1"));
      add(new NextButton("Btn 2"));
      add(new NextButton("Btn 3"));
      add(new NextButton("Btn 4"));
      resize(200, 100);
      setVisible(true);
   }
}


Slide 92 ©Copyright 1997 Jan Newmarch