/*ch0718.java*/ 
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ch0718 extends JFrame implements ActionListener
{ CardLayout card=new CardLayout();
  Container c=getContentPane();
  public ch0718()
  { super("¿¨Æ¬²¼¾ÖÊµÀý");
    JButton cb[]=new JButton[6];
    c.setLayout(card);
    for(int i=1;i<5;i++)
    { cb[i]=new JButton("¿¨Æ¬ºÅÎª£º"+i);
      cb[i].addActionListener(this);
      c.add(String.valueOf(i),cb[i]);
    }
    card.show(c,String.valueOf(4));
    setSize(200,100);
    show();
  }
  public void actionPerformed(ActionEvent e)
  { card.next(c);
  }
  public static void main(String args[])
  { new ch0718();
  }
}
