你必须使用 JOptionPane 吗?
您也可以使用没有窗口装饰的 J(Internal)Frame 或闪屏!
JInternalFrame inFrame = new JInternalFrame();
BasicInternalFrameTitlePane titlePane =
(BasicInternalFrameTitlePane) ((BasicInternalFrameUI) inFrame.getUI()).
getNorthPane();
inFrame.remove(titlePane);