我使用以下代码更改了JOptionPane的背景:
UIManager.put("OptionPane.background",new ColorUIResource(204, 255, 255));
但结果看起来不像我期望的那样
答案 0 :(得分:1)
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.put("OptionPane.background", Color.BLUE);
UIManager.put("Panel.background", Color.BLUE);
JOptionPane.showConfirmDialog(null, "YOUR INFORMATION HERE");