diff --git a/core/src/test/java/ui/ComponentDemo.java b/core/src/test/java/ui/ComponentDemo.java index f7e59f73..a1c9f10b 100644 --- a/core/src/test/java/ui/ComponentDemo.java +++ b/core/src/test/java/ui/ComponentDemo.java @@ -225,6 +225,26 @@ public interface ComponentDemo { isSelected())); } }); + dev.add(new JCheckBoxMenuItem("Darklaf/System Laf"){ + { + setSelected(true); + addActionListener(e -> { + if (isSelected()) { + LafManager.install(); + } else { + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + LafManager.updateLaf(); + } catch (ClassNotFoundException + | UnsupportedLookAndFeelException + | IllegalAccessException + | InstantiationException classNotFoundException) { + classNotFoundException.printStackTrace(); + } + } + }); + } + }); return dev; }