NetBeansでプログラムを実行したときにjarを作成した後、ニンバスのルックアンドフィールが表示されないニンバスのルックアンドフィールは完全に機能しますが、ジャーを作成してjarからアプリケーションを実行したときにニンバスのルックアンドフィールが表示されませんコード:
public static void main(String[] args)
{
boolean isNimbus = false;
try {
for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels())
{
if ("Nimbus".equals(info.getName()))
{
UIManager.setLookAndFeel(info.getClassName());
isNimbus = true;
break;
}
}
if(!isNimbus)
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
} catch (ClassNotFoundException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
} catch (UnsupportedLookAndFeelException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
Dashboard dashboardObj = new Dashboard();
}