src/share/classes/sun/tools/jconsole/inspector/XOperations.java

Print this page
rev 5340 : 7017818: NLS: JConsoleResources.java cannot be handled by translation team
Reviewed-by: duke

@@ -24,27 +24,24 @@
  */
 
 package sun.tools.jconsole.inspector;
 
 import javax.swing.*;
-import javax.swing.event.*;
-import javax.swing.table.*;
-import javax.swing.tree.*;
 import java.awt.BorderLayout;
 import java.awt.GridLayout;
 import java.awt.FlowLayout;
 import java.awt.Component;
 import java.awt.event.*;
 import java.util.*;
-import java.io.*;
 
 import javax.management.*;
 
-import sun.tools.jconsole.Resources;
 import sun.tools.jconsole.MBeansTab;
 import sun.tools.jconsole.JConsole;
+import sun.tools.jconsole.resources.Messages;
 
+@SuppressWarnings("serial")
 public abstract class XOperations extends JPanel implements ActionListener {
 
     public final static String OPERATION_INVOCATION_EVENT =
             "jam.xoperations.invoke.result";
     private java.util.List<NotificationListener> notificationListenersList;

@@ -183,24 +180,24 @@
                             !entryIf.getReturnType().equals(Void.class.getName())) {
                         fireChangedNotification(OPERATION_INVOCATION_EVENT, button, result);
                     } else {
                         new ThreadDialog(
                                 button,
-                                Resources.getText("Method successfully invoked"),
-                                Resources.getText("Info"),
+                                Messages.METHOD_SUCCESSFULLY_INVOKED,
+                                Messages.INFO,
                                 JOptionPane.INFORMATION_MESSAGE).run();
                     }
                 } catch (Throwable t) {
                     t = Utils.getActualException(t);
                     if (JConsole.isDebug()) {
                         t.printStackTrace();
                     }
                     new ThreadDialog(
                             button,
-                            Resources.getText("Problem invoking") + " " +
+                            Messages.PROBLEM_INVOKING + " " +
                             button.getText() + " : " + t.toString(),
-                            Resources.getText("Error"),
+                            Messages.ERROR,
                             JOptionPane.ERROR_MESSAGE).run();
                 }
             }
         }.execute();
     }