JAL-4177 disable ‘Cancel’ as well - since we as yet do not support cancelling the...
[jalview.git] / src / jalview / jbgui / GStructureChooser.java
index 64fffc4..d5e36c1 100644 (file)
@@ -106,6 +106,8 @@ public abstract class GStructureChooser extends JPanel
    */
   protected static final String VIEWS_LOCAL_PDB = "VIEWS_LOCAL_PDB";
 
+  protected JPanel actionsPanel;
+
   protected JPanel statusPanel = new JPanel();
 
   public JLabel statusBar = new JLabel();
@@ -121,6 +123,7 @@ public abstract class GStructureChooser extends JPanel
 
   protected StringBuilder errorWarning = new StringBuilder();
 
+  protected JButton btn_cancel; 
   protected JButton btn_add;
 
   protected JButton btn_newView;
@@ -414,7 +417,7 @@ public abstract class GStructureChooser extends JPanel
       }
     });
 
-    JButton btn_cancel = new JButton(
+    btn_cancel = new JButton(
             MessageManager.getString("action.cancel"));
     btn_cancel.setFont(VERDANA_12);
     btn_cancel.addActionListener(new ActionListener()
@@ -679,7 +682,7 @@ public abstract class GStructureChooser extends JPanel
 
     targetView.setVisible(false);
 
-    JPanel actionsPanel = new JPanel(new MigLayout());
+    actionsPanel = new JPanel(new MigLayout());
     actionsPanel.add(targetView, "left");
     actionsPanel.add(btn_add, "wrap");
     actionsPanel.add(chk_superpose, "left");