use platform-independent laf for standalone jar deployment
This commit is contained in:
parent
e64cd633a5
commit
642d47c2d2
|
@ -176,9 +176,9 @@ public class Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void startUserInterface(ArgumentBean args) {
|
private static void startUserInterface(ArgumentBean args) {
|
||||||
// use native LaF an all platforms
|
// use native LaF an all platforms (use platform-independent laf for standalone jar deployment)
|
||||||
try {
|
try {
|
||||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
UIManager.setLookAndFeel(isExecutableJar() ? "javax.swing.plaf.nimbus.NimbusLookAndFeel" : UIManager.getSystemLookAndFeelClassName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
debug.log(Level.SEVERE, e.getMessage(), e);
|
debug.log(Level.SEVERE, e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,10 @@ public final class Settings {
|
||||||
return System.getProperty("application.deployment", "jar");
|
return System.getProperty("application.deployment", "jar");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isExecutableJar() {
|
||||||
|
return isApplicationDeployment("jar");
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isAppStore() {
|
public static boolean isAppStore() {
|
||||||
return isApplicationDeployment("mas", "usc");
|
return isApplicationDeployment("mas", "usc");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue