import java.awt.*;
public class CardLayoutTest {
public static void main (String []args){
Frame f= new Frame();
f.setTitle("CardLayoutTest");
f.setSize(300,150);
CardLayout cl= new CardLayout();
f.setLayout(cl);
Button b1 = new Button("Boton 1");
f.add(b1,"uno");
Button b2 = new Button("Boton 2");
f.add(b2,"dos");
Button b3 = new Button("Boton 3");
f.add(b3,"tres");
f.setVisible(true);
cl.show(f,"dos");
}
}
No hay comentarios:
Publicar un comentario