JavaScript alert()
弹出窗口(如果有的话)的 Java Swing 对应物是什么?
最佳答案
完成此类弹出窗口的基本方法是使用JOptionPane.showMessageDialog
,see here .
JOptionPane.showMessageDialog(frame, "here comes the text.");
// assumes frame to be a reference to the desired parent frame
关于java - java中的JS样式警告框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11065485/