mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 06:50:56 +03:00
fix: Illegal reflective access operation on mac
This commit is contained in:
@@ -191,16 +191,10 @@ public abstract class FlatLaf
|
|||||||
private BasicLookAndFeel getBase() {
|
private BasicLookAndFeel getBase() {
|
||||||
if( base == null ) {
|
if( base == null ) {
|
||||||
if( SystemInfo.IS_MAC ) {
|
if( SystemInfo.IS_MAC ) {
|
||||||
// use Mac Aqua LaF as base
|
base = (BasicLookAndFeel) UIManager.getLookAndFeel();
|
||||||
String aquaLafClassName = "com.apple.laf.AquaLookAndFeel";
|
} else {
|
||||||
try {
|
|
||||||
base = (BasicLookAndFeel) Class.forName( aquaLafClassName ).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();
|
base = new MetalLookAndFeel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user