From: gmungoc Date: Mon, 9 Jul 2018 14:57:30 +0000 (+0100) Subject: JAL-3032 BorderLayout renders panel correctly in JalviewJS X-Git-Tag: Release_2_11_4_0~45^2~18^2~557 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f8b06f17bdd062f74d8c6933e23d3f8f83f275f4;p=jalview.git JAL-3032 BorderLayout renders panel correctly in JalviewJS --- diff --git a/src/jalview/gui/TextColourChooser.java b/src/jalview/gui/TextColourChooser.java index a1b3caf..faf19ad 100644 --- a/src/jalview/gui/TextColourChooser.java +++ b/src/jalview/gui/TextColourChooser.java @@ -33,7 +33,6 @@ import java.util.HashMap; import java.util.Map; import javax.swing.BorderFactory; -import javax.swing.JColorChooser; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; @@ -85,7 +84,7 @@ public class TextColourChooser col2.setToolTipText(MessageManager.getString("label.light_colour")); col2.setBackground(original2); final JPanel bigpanel = new JPanel(new BorderLayout()); - JPanel panel = new JPanel(); + JPanel panel = new JPanel(new BorderLayout()); bigpanel.add(panel, BorderLayout.CENTER); bigpanel.add( new JLabel("" @@ -93,9 +92,9 @@ public class TextColourChooser "label.select_dark_light_set_threshold") + ""), BorderLayout.NORTH); - panel.add(col1); - panel.add(slider); - panel.add(col2); + panel.add(col1, BorderLayout.WEST); + panel.add(slider, BorderLayout.CENTER); + panel.add(col2, BorderLayout.EAST); col1.addMouseListener(new MouseAdapter() {