JAL-1988 JAL-3416 Using the flatlaf-extras About, Preferences and Quit handler system...
[jalview.git] / src / jalview / gui / TextColourChooser.java
index 01d9b81..5d22abb 100644 (file)
@@ -23,7 +23,6 @@ package jalview.gui;
 import jalview.datamodel.SequenceGroup;
 import jalview.gui.JalviewColourChooser.ColourChooserListener;
 import jalview.util.MessageManager;
-import jalview.util.dialogrunner.RunResponse;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
@@ -150,7 +149,7 @@ public class TextColourChooser
         MessageManager.getString("action.cancel") };
     String title = MessageManager
             .getString("label.adjust_foreground_text_colour_threshold");
-    RunResponse action = new RunResponse(JvOptionPane.NO_OPTION) // = 1 Cancel
+    Runnable action = new Runnable() // response for 1 = Cancel
     {
       @Override
       public void run()
@@ -158,7 +157,7 @@ public class TextColourChooser
         restoreInitialSettings();
       }
     };
-    JvOptionPane.newOptionDialog(alignPanel).addResponse(action)
+    JvOptionPane.newOptionDialog(alignPanel).setResponseHandler(1, action)
             .showInternalDialog(bigpanel, title,
                     JvOptionPane.YES_NO_CANCEL_OPTION,
                     JvOptionPane.PLAIN_MESSAGE, null, options,