diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java index eccc0e84..8a418745 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java @@ -229,7 +229,7 @@ public class DarkFileChooserUI extends DarkFileChooserUIBridge { } protected Component createTopButtonArea() { - Box box = new Box(BoxLayout.LINE_AXIS); + Box box = Box.createHorizontalBox(); box.add(createUpFolderButton()); box.add(makeHorizontalSpacer()); diff --git a/core/src/test/java/ui/button/GroupedButtonDemo.java b/core/src/test/java/ui/button/GroupedButtonDemo.java index bbde0cb7..11117e64 100644 --- a/core/src/test/java/ui/button/GroupedButtonDemo.java +++ b/core/src/test/java/ui/button/GroupedButtonDemo.java @@ -39,7 +39,7 @@ public class GroupedButtonDemo implements ComponentDemo { @Override public JComponent createComponent() { - Box box = new Box(BoxLayout.LINE_AXIS); + Box box = Box.createHorizontalBox(); Icon icon = IconLoader.get().getIcon("menu/listFiles.svg", 19, 19, true); Icon iconSelected = IconLoader.get().getIcon("menu/listFilesSelected.svg", 19, 19, true); ButtonGroup bg = new ButtonGroup(); @@ -49,7 +49,8 @@ public class GroupedButtonDemo implements ComponentDemo { b = createButton(icon, iconSelected, bg, AlignmentExt.MIDDLE_HORIZONTAL, b); box.add(b); } - box.add(createButton(icon, iconSelected, bg, AlignmentExt.RIGHT, b), true); + box.add(createButton(icon, iconSelected, bg, AlignmentExt.RIGHT, true, b)); + return new DemoPanel(box); } @@ -69,7 +70,7 @@ public class GroupedButtonDemo implements ComponentDemo { if (prev != null) prev.putClientProperty(DarkButtonUI.KEY_RIGHT_NEIGHBOUR, this); putClientProperty(DarkButtonUI.KEY_LEFT_NEIGHBOUR, prev); setSelected(isSelected); -// bg.add(this); + bg.add(this); }}; }