Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8214555

JDK12b20: Setting SynthButtonUI leads to NPE thrown from SynthButtonUI.uninstallDefaults()

    Details

      Description

      Since JDK12b20 the following:

              UIManager.setLookAndFeel(new SynthLookAndFeel());
              SynthButtonUI ui = new SynthButtonUI();
              JButton b1 = new JButton();
              JButton b2 = new JButton();
              b1.setUI(ui);
              b2.setUI(ui);

      leads to NullPointerException

      Exception in thread "main" java.lang.NullPointerException
      at java.desktop/javax.swing.plaf.synth.SynthButtonUI.uninstallDefaults(SynthButtonUI.java:137)
      at java.desktop/javax.swing.plaf.basic.BasicButtonUI.uninstallUI(BasicButtonUI.java:181)
      at java.desktop/javax.swing.JComponent.uninstallUIAndProperties(JComponent.java:700)
      at java.desktop/javax.swing.JComponent.setUI(JComponent.java:675)
      at java.desktop/javax.swing.AbstractButton.setUI(AbstractButton.java:1753)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psadhukhan Prasanta Sadhukhan
                Reporter:
                dbessono Dmitry Bessonov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: