diff --git a/swingbits/pom.xml b/swingbits/pom.xml index d4f8725..3456b20 100644 --- a/swingbits/pom.xml +++ b/swingbits/pom.xml @@ -64,11 +64,11 @@ - - com.miglayout - miglayout - 3.7.4 - + + com.miglayout + miglayout-swing + 5.0 + org.slf4j slf4j-api diff --git a/swingbits/src/main/java/org/oxbow/swingbits/dialog/task/TaskDialogs.java b/swingbits/src/main/java/org/oxbow/swingbits/dialog/task/TaskDialogs.java index a7c1e8d..b3e9716 100644 --- a/swingbits/src/main/java/org/oxbow/swingbits/dialog/task/TaskDialogs.java +++ b/swingbits/src/main/java/org/oxbow/swingbits/dialog/task/TaskDialogs.java @@ -62,6 +62,10 @@ import net.miginfocom.swing.MigLayout; +import net.miginfocom.layout.CC; +import net.miginfocom.layout.LC; +import net.miginfocom.swing.MigLayout; + /** * * A set of methods to simplify creation of task dialogs @@ -421,15 +425,16 @@ public int choice(final int defaultChoice, List choices) { final List buttons = new ArrayList(); CommandLinkButton btn; - JPanel p = new JPanel(new MigLayout("")); - p.setOpaque(false); - for (CommandLink link : choices) { - btn = new CommandLinkButton(link, TaskDialog.getDesign().getCommandLinkPainter()); - models.add(btn.getModel()); - buttons.add(btn); - bGroup.add(btn); - p.add(btn, "dock north, gapbottom 8"); - } + final JPanel p = new JPanel(new MigLayout(new LC().flowY().noGrid())); + p.setOpaque(false); + for (final CommandLink link : choices) + { + btn = new CommandLinkButton(link, TaskDialog.getDesign().getCommandLinkPainter()); + models.add(btn.getModel()); + buttons.add(btn); + bGroup.add(btn); + p.add(btn, new CC().gapBottom("8")); + } if (defaultChoice >= 0 && defaultChoice < choices.size()) { bGroup.setSelected(models.get(defaultChoice), true);