src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -392,10 +392,11 @@
                 nll = 1;
             }
             if (nl >= 0) {
                 // break up newlines
                 if (nl == 0) {
+                    @SuppressWarnings("serial") // anonymous class
                     JPanel breakPanel = new JPanel() {
                         public Dimension getPreferredSize() {
                             Font       f = getFont();
 
                             if (f != null) {

@@ -1337,10 +1338,11 @@
      * not they are registered on the JTextField. This is used as we really
      * want the ActionListener to be notified so that we can push the
      * change to the JOptionPane, but we also want additional bindings
      * (those of the JRootPane) to be processed as well.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private static class MultiplexingTextField extends JTextField {
         private KeyStroke[] strokes;
 
         MultiplexingTextField(int cols) {
             super(cols);

@@ -1430,10 +1432,11 @@
                 button.setMnemonic(mnemonic);
             }
             return button;
         }
 
+        @SuppressWarnings("serial") // Superclass is not serializable across versions
         private static class ConstrainedButton extends JButton {
             int minimumWidth;
 
             ConstrainedButton(String text, int minimumWidth) {
                 super(text);