From b08aa323c3e2fcacbe28b003d2d2a3c027d19b31 Mon Sep 17 00:00:00 2001 From: MMWarowny Date: Tue, 4 Feb 2020 12:24:19 +0000 Subject: [PATCH] JAL-3515 Change to JvOptionPane wrapper --- src/jalview/gui/SlivkaPreferences.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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); -- 1.7.10.2