JOptionPane外观和感觉问题

时间:2013-07-05 06:28:47

标签: java swing joptionpane look-and-feel

当我在具有Metal外观的Linux中运行我的应用程序时,无论是否按下该按钮都无法识别用户。虽然按钮处于按下模式,但看起来按钮没有被按下。右侧的关闭按钮图标也与Windows不同。

我该如何解决这两个问题?

修改

我按照以下方式行事。

try {
     m_FrameBackground = new Color(Integer.parseInt((String)
          Client.getClient().getProperty("BackgroundColor"),16));
     m_TaskBackground = new Color(Integer.parseInt((String) 
          Client.getClient().getProperty("TaskBackground"),16));
} catch (Exception e) {
     m_FrameBackground = new Color(Integer.parseInt("dfd3be",16));
     m_TaskBackground = new Color(Integer.parseInt("dfd3be",16));
}
m_FuelTheme.secondary3 = new ColorUIResource(m_FrameBackground);
m_FuelTheme.secondary2 = new ColorUIResource(m_FrameBackground.darker());
m_FuelTheme.secondary1 = new ColorUIResource(m_FrameBackground.darker().darker());
MetalLookAndFeel.setCurrentTheme(m_FuelTheme);
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
JDialog.setDefaultLookAndFeelDecorated(true);

0 个答案:

没有答案