JAL-1632 enable/disable CalculationChooser buttons on focus
[jalview.git] / src / jalview / gui / CalculationChooser.java
index 694b096..fe6336e 100644 (file)
@@ -116,7 +116,20 @@ public class CalculationChooser extends JPanel
     frame = new JInternalFrame();
     frame.setContentPane(this);
     this.setBackground(Color.white);
+    frame.addFocusListener(new FocusListener()
+    {
+
+      @Override
+      public void focusLost(FocusEvent e)
+      {
+      }
 
+      @Override
+      public void focusGained(FocusEvent e)
+      {
+        validateCalcTypes();
+      }
+    });
     /*
      * Layout consists of 3 or 4 panels:
      * - first with choice of PCA or tree method NJ or AV