package jalview.gui;
import jalview.util.MessageManager;
-import jalview.util.dialogrunner.RunResponse;
import java.awt.FlowLayout;
import java.awt.Font;
}
/**
- * Shows the dialog, and runs the response action if OK is selected. Note the
- * RunResponse should be constructed to act on dialog return value
- * JvOptionPane.OK_OPTION.
+ * Shows the dialog, and runs the response action if OK is selected
*
* @param action
*/
public void showDialog(JComponent parent, String title,
- RunResponse action)
+ Runnable action)
{
Object[] options = new Object[] { MessageManager.getString("action.ok"),
MessageManager.getString("action.cancel") };
- JvOptionPane.newOptionDialog(parent).response(action)
+ JvOptionPane.newOptionDialog(parent).setResponseHandler(0, action)
.showInternalDialog(panel, title,
JvOptionPane.YES_NO_CANCEL_OPTION,
JvOptionPane.PLAIN_MESSAGE, null, options,