From: MMWarowny Date: Tue, 4 Feb 2020 12:24:19 +0000 (+0000) Subject: JAL-3515 Change to JvOptionPane wrapper X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Ffeature%2FJAL-3515-slivka-preferences;p=jalview.git JAL-3515 Change to JvOptionPane wrapper --- diff --git a/src/jalview/gui/SlivkaPreferences.java b/src/jalview/gui/SlivkaPreferences.java index 4df4bf6..f4f6a9a 100644 --- a/src/jalview/gui/SlivkaPreferences.java +++ b/src/jalview/gui/SlivkaPreferences.java @@ -138,7 +138,7 @@ public class SlivkaPreferences extends JPanel private String showEditUrlDialog(String oldUrl) { - String input = (String) JOptionPane + String input = (String) JvOptionPane .showInternalInputDialog( this, MessageManager.getString("label.url:"), @@ -156,8 +156,10 @@ public class SlivkaPreferences extends JPanel new URL(input); } catch (MalformedURLException ex) { - JOptionPane.showMessageDialog(this, - MessageManager.getString("label.invalid_url"), "Warning", + JvOptionPane.showInternalMessageDialog(this, + MessageManager.getString("label.invalid_url"), + UIManager.getString("OptionPane.messageDialogTitle", + MessageManager.getLocale()), JOptionPane.WARNING_MESSAGE); return null; } @@ -203,7 +205,7 @@ public class SlivkaPreferences extends JPanel }; private ActionListener moveUrlUpAction = (ActionEvent e) -> { - int i = urlListTable.getSelectedRow(); + final int i = urlListTable.getSelectedRow(); if (i > 0) { moveTableRow(i, i - 1); @@ -212,7 +214,7 @@ public class SlivkaPreferences extends JPanel }; private ActionListener moveUrlDownAction = (ActionEvent e) -> { - int i = urlListTable.getSelectedRow(); + final int i = urlListTable.getSelectedRow(); if (i >= 0 && i < urls.size() - 1) { moveTableRow(i, i + 1);