JOptionPane.showMessageDialog出现在浏览器下面的解决方法

将JOptionPane.showMessageDialog(null, result, "发布公告:", JOptionPane.INFORMATION_MESSAGE);中的参数null

更改为JOptionPane.showMessageDialog(JOptionPane.getRootFrame(), result, "发布公告:", JOptionPane.INFORMATION_MESSAGE);

原文地址:https://www.cnblogs.com/wmcoder/p/5685610.html