import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
+import javax.swing.UnsupportedLookAndFeelException;
import com.formdev.flatlaf.FlatLightLaf;
import com.formdev.flatlaf.util.SystemInfo;
private static boolean setFlatLookAndFeel()
{
- boolean set = setSpecificLookAndFeel("flatlaf light",
- Platform.isMac() ? "com.formdev.flatlaf.themes.FlatMacLightLaf" :
- "com.formdev.flatlaf.FlatLightLaf", false);
+ boolean set = false;
+ if (Platform.isMac()) {
+ try
+ {
+ UIManager.setLookAndFeel("com.formdev.flatlaf.themes.FlatMacLightLaf");
+ set = true;
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e)
+ {
+ Console.debug("Exception loading FlatMacLightLaf", e);
+ }
+ }
+ if (!set) {
+ try
+ {
+ UIManager.setLookAndFeel("com.formdev.flatlaf.FlatLightLaf");
+ set = true;
+ } catch (ClassNotFoundException | InstantiationException
+ | IllegalAccessException | UnsupportedLookAndFeelException e)
+ {
+ Console.debug("Exception loading FlatLightLaf", e);
+ }
+ }
if (set)
{
if (Platform.isMac())