2
时,JOptionPane没有效果我在主类中设置了下面的外观。当外观设置为
基类代码:
static
{
try
{
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
catch (Exception exception)
{
logger.error("Error setting look and feel!", exception);
}
}
子类代码:
int result = JOptionPane.showOptionDialog(panel,
message,
"",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,
formattedOptions,
formattedOptions[0]);
窗户的外观和感觉是不会被置为JOptionPane的窗口,而它的显示java的默认外观感觉。
你能帮我一下吗?
仅仅只为JOptionPane的,其他部件都在正确的外观,或不 –
是所有其他组件都表现为按设定的外观和在主类的感觉。但JOPtion不是? – user1280096
在调用JOptionPane之前,您是否设置了外观和感觉**? – Bnrdo