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

Unexpected exception output from JComboBox.setUI method

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description



      Name: nkR10003 Date: 07/17/2000


      JComboBox.setUI method sometimes prints NullPointerException exception output
      to the console while setting BasicComboBoxUI user interface. See example below:

      %java -fullversion
      java full version "1.4.0beta-b23"
      ------------------example--------------------
      //ComboBoxExample.java
      //
      import javax.swing.*;
      import javax.swing.plaf.basic.*;
      public class ComboBoxExample {
          
          public static void main(String[] args) {
              BasicComboBoxUI ui = new BasicComboBoxUI();
              JComboBox comboBox = new JComboBox();
              comboBox.setUI(ui);
              System.out.println("Finish");
              System.exit(0);
          }
      }
      ----------------output:----------------------
      Exception occurred during event dispatching:
      java.lang.NullPointerException
              at javax.swing.SwingUtilities.replaceUIInputMap(SwingUtilities.java:1405)
              at javax.swing.plaf.basic.BasicComboBoxUI.installKeyboardActions(BasicComboBoxUI.java:1270)
              at javax.swing.plaf.basic.BasicComboBoxUI$1.run(BasicComboBoxUI.java:159)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:353)
              at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:127)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:117)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:96)
      Finish
      ---------------------------------------------
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              mdavidsosunw Mark Davidson (Inactive)
              Reporter:
              knasunw Kna Kna (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: