void jButton5_actionPerformed(ActionEvent e) {
System.out.println("JButton5 pressed");
try{Thread.sleep(5000); // 5 秒钟?
}catch(Exception ex){} cardLayout1.show(jPanel1,"jPanel7"); // 不肯定这句对不对 System.out.println("show executed");
。
System.exit(0);
}
System.out.println("JButton5 pressed");
try{Thread.sleep(5000); // 5 秒钟?
}catch(Exception ex){} cardLayout1.show(jPanel1,"jPanel7"); // 不肯定这句对不对 System.out.println("show executed");
。
System.exit(0);
}
你这样写能实现么?还有,这样能显示出System.out.println("JButton5 pressed")么,好象不行!
后面加入validate()
另外, ajiao()你说的cardLayout1.show(jPanel1,"jPanel7");
后面加入validate();这样不行,也显示不出来,到底是那里的原因呢?