JAL-2643 updated threshold on threshold value focus lost
[jalview.git] / src / jalview / gui / FeatureColourChooser.java
index 4172819..192fd23 100644 (file)
@@ -31,6 +31,8 @@ import java.awt.Dimension;
 import java.awt.FlowLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 
@@ -286,6 +288,14 @@ public class FeatureColourChooser extends JalviewDialog
         thresholdValue_actionPerformed();
       }
     });
+    thresholdValue.addFocusListener(new FocusAdapter()
+    {
+      @Override
+      public void focusLost(FocusEvent e)
+      {
+        thresholdValue_actionPerformed();
+      }
+    });
     slider.setPaintLabels(false);
     slider.setPaintTicks(true);
     slider.setBackground(Color.white);