mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
fix #60 Illegal reflective access operation on mac
This commit is contained in:
@@ -191,8 +191,15 @@ public abstract class FlatLaf
|
||||
private BasicLookAndFeel getBase() {
|
||||
if( base == null ) {
|
||||
if( SystemInfo.IS_MAC ) {
|
||||
base = (BasicLookAndFeel) UIManager.getLookAndFeel();
|
||||
} else {
|
||||
// use Mac Aqua LaF as base
|
||||
String aquaLafClassName = "com.apple.laf.AquaLookAndFeel";
|
||||
try {
|
||||
base = (BasicLookAndFeel) Class.forName( aquaLafClassName ).getDeclaredConstructors()[0].newInstance();
|
||||
} catch( Exception ex ) {
|
||||
LOG.log( Level.SEVERE, "FlatLaf: Failed to initialize base look and feel '" + aquaLafClassName + "'.", ex );
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
} else
|
||||
base = new MetalLookAndFeel();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user