diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 36229a53..08f306b9 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -15,6 +15,8 @@ dependencies { implementation("org.swinglabs:jxlayer") compileOnly("org.swinglabs:swingx") testImplementation("com.formdev:svgSalamander") + testImplementation("com.miglayout:miglayout-core") + testImplementation("com.miglayout:miglayout-swing") testImplementation("org.swinglabs:swingx") } diff --git a/core/src/test/java/ui/toolTip/ToolTipDemo.java b/core/src/test/java/ui/toolTip/ToolTipDemo.java index 5137379b..49558c4d 100644 --- a/core/src/test/java/ui/toolTip/ToolTipDemo.java +++ b/core/src/test/java/ui/toolTip/ToolTipDemo.java @@ -28,6 +28,7 @@ import com.github.weisj.darklaf.components.tooltip.ToolTipContext; import com.github.weisj.darklaf.components.tooltip.ToolTipStyle; import com.github.weisj.darklaf.components.tooltip.TooltipAwareButton; import com.github.weisj.darklaf.util.Alignment; +import net.miginfocom.swing.MigLayout; import ui.ComponentDemo; import ui.DemoPanel; @@ -48,13 +49,12 @@ public class ToolTipDemo implements ComponentDemo { button.setToolTipText("ToolTip demo text!"); JPanel controlPanel = panel.getControls(); - controlPanel.setLayout(new GridLayout(4, 2)); + controlPanel.setLayout(new MigLayout("fillx, wrap 2", "[][grow]")); - controlPanel.add(new JLabel()); controlPanel.add(new JCheckBox("Align inside") {{ setSelected(context.isAlignInside()); addActionListener(e -> context.setAlignInside(isSelected())); - }}); + }}, "span"); controlPanel.add(new JLabel("Tooltip Style:", JLabel.RIGHT)); controlPanel.add(new JComboBox(ToolTipStyle.values()) {{ setSelectedItem(ToolTipStyle.BALLOON); diff --git a/dependencies-bom/build.gradle.kts b/dependencies-bom/build.gradle.kts index d20e1342..2e50eb22 100644 --- a/dependencies-bom/build.gradle.kts +++ b/dependencies-bom/build.gradle.kts @@ -33,5 +33,7 @@ dependencies { apiv("org.swinglabs:jxlayer") apiv("org.swinglabs:swingx") apiv("com.formdev:svgSalamander") + apiv("com.miglayout:miglayout-core", "miglayout") + apiv("com.miglayout:miglayout-swing", "miglayout") } } diff --git a/gradle.properties b/gradle.properties index f8096d78..8c076e60 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,5 +17,6 @@ com.github.johnrengelman.shadow.version =5.1.0 # Dependencies jna.version =4.1.0 jxlayer.version =3.0.4 +miglayout.version =5.2 swingx.version =1.6.1 svgSalamander.version =1.1.2.1