FlatTestFrame: add JGoodies Windows LaF only when running on Windows

This commit is contained in:
Karl Tauber
2020-03-15 10:21:28 +01:00
parent 4aeabea3fe
commit df1634de3d

View File

@@ -130,7 +130,7 @@ public class FlatTestFrame
}
String looksWindowsClassName = "com.jgoodies.looks.windows.WindowsLookAndFeel";
if( isClassAvailable( looksWindowsClassName ) ) {
if( SystemInfo.IS_WINDOWS && isClassAvailable( looksWindowsClassName ) ) {
lafModel.addElement( new LookAndFeelInfo( "JGoodies Looks Windows (F7)", looksWindowsClassName ) );
registerSwitchToLookAndFeel( KeyEvent.VK_F7, looksWindowsClassName );
}
@@ -231,7 +231,7 @@ public class FlatTestFrame
try {
Class.forName( className, false, getClass().getClassLoader() );
return true;
} catch( ClassNotFoundException ex ) {
} catch( Throwable ex ) {
return false;
}
}