Professional Documents
Culture Documents
CardLayoutDemo AJP
CardLayoutDemo AJP
*;
import java.awt.*;
public CardLayoutDemo2()
{
setLayout(new FlowLayout());
btn1.addActionListener(this);
btn2.addActionListener(this);
btn3.addActionListener(this);
}
if(ob==btn1)
{
// means show color button was clicked
cl.show(deckpanel, "color_card");
}
if(ob==btn2)
{
// means show country button was clicked
cl.show(deckpanel, "country_card");
}
if(ob==btn3)
{
// means show os button was clicked
cl.show(deckpanel, "os_card");
}
}