请问在swing布局中,如何使CardLayout 布局的lpanel切换卡片.
请问在swing布局中,如何使CardLayout 布局的
public class Cmain extends JFrame {
}
public class TopJb extends JButton{
public TopJb(String string) {
super();
this.setText(string);
this.setHorizontalTextPosition(SwingConstants.CENTER);
this.setVerticalTextPosition(SwingConstants.BOTTOM);
this.addActionListener(new ActionListener() { //
@Override
public void actionPerformed(ActionEvent e) {
//这里应该怎么写?
}
});
}