目次
Java SE 6 update 10 リリースで導入されたクロスプラットフォームの Look & Feel である Nimbus は、2D ベクトルグラフィックスでレンダリングされるため、任意の解像度でレンダリングできます。
Nimbus Look & Feel をアクティブ化するには、次の 2 つの方法があります。
ソースコードに次の行を追加します。
try {
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (UnsupportedLookAndFeelException e) {
// handle exception
} catch (ClassNotFoundException e) {
// handle exception
} catch (InstantiationException e) {
// handle exception
} catch (IllegalAccessException e) {
// handle exception
}
アプリケーションで Nimbus Look & Feel をアクティブ化するには、Java アプリケーションの実行時に次のパラメータを指定します。
-Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel