Merge branch 'releases/Release_2_11_3_Branch'
[jalview.git] / src / jalview / gui / EditNameDialog.java
index f7225f5..6d5cb46 100644 (file)
@@ -86,7 +86,7 @@ public class EditNameDialog
     panel.add(descriptionPanel);
 
     JLabel nameLabel = new JLabel(label1);
-    nameLabel.setFont(COURIER_12);
+    // nameLabel.setFont(COURIER_12);
     namePanel.add(nameLabel);
 
     id = new JTextField(name, 40);
@@ -100,7 +100,7 @@ public class EditNameDialog
     if (desc != null || label2 != null)
     {
       JLabel descLabel = new JLabel(label2);
-      descLabel.setFont(COURIER_12);
+      // descLabel.setFont(COURIER_12);
       descriptionPanel.add(descLabel);
       descriptionPanel.add(description);
     }
@@ -113,12 +113,22 @@ public class EditNameDialog
    */
   public void showDialog(JComponent parent, String title, Runnable action)
   {
-    Object[] options = new Object[] { MessageManager.getString("action.ok"),
-        MessageManager.getString("action.cancel") };
-    JvOptionPane.newOptionDialog(parent).setResponseHandler(0, action)
-            .showInternalDialog(panel, title,
-                    JvOptionPane.YES_NO_CANCEL_OPTION,
-                    JvOptionPane.PLAIN_MESSAGE, null, options,
-                    MessageManager.getString("action.ok"));
+    String ok = MessageManager.getString("action.ok");
+    String cancel = MessageManager.getString("action.cancel");
+    String[] options = new String[] { ok, cancel };
+
+    JvOptionPane.newOptionDialog(parent)
+            .setResponseHandler(JvOptionPane.OK_OPTION, action)
+            .showInternalDialog(panel, title, JvOptionPane.OK_CANCEL_OPTION,
+                    JvOptionPane.PLAIN_MESSAGE, null, options, ok);
+
+    /*
+    List<Runnable> actions = new ArrayList<>();
+    actions.add(action);
+    actions.add(JvOptionPane.NULLCALLABLE);
+    
+    JvOptionPane.frameDialog(panel, title, JvOptionPane.PLAIN_MESSAGE,
+            options, ok, actions, false);
+    */
   }
 }