jdk1.5中Frame的show()方法被setVisible(boolean)替代了会建议你使用新的方法把show(); 改成 setVisible(true);