日期:2014-05-20  浏览次数:20850 次

为什么JOptionPane.showmessagedialog会弹出两次一样的对话框来?
public void setVisible(boolean b) {
super.setVisible(b);
if (b)
JOptionPane
.showMessageDialog(
null,
"this software will be working now, Please press the button ENTER ",
"Notes", JOptionPane.WARNING_MESSAGE);
}
为什么JOptionPane.showmessagedialog会弹出两次一样的对话框来?

------解决方案--------------------
别的代码呢 你继承的是什么啊
------解决方案--------------------
这个。。。。。
------解决方案--------------------
代码过少
------解决方案--------------------
楼主把完整代码贴一下吧,有可能是因为之前有调用弹出对话框,也可能是你重写setVisible()的缘故
------解决方案--------------------
多贴些代码