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

NullPointerException in JComboBox during change of look&Feel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.3.1
    • 1.2.2, 1.3.0
    • client-libs
    • ladybird
    • generic, x86
    • generic, windows_95, windows_nt



        Name: skT88420 Date: 07/22/99


        Problem: NullPointerException in JComboBox while changing look and feel
        Platform: Windows NT 4.o with service pack 3
        JDK: 1.2.2 with hotspot

        I have recreated the problem using the SwingSet demo provided in JDK 1.2.2.

        Please follow the sequence below:

        1) Start the SwingSet demo (java -jar SwingSet.jar).
        2) Select the ComboBox tab.
        3) Give focus to an Editable ComboBox by clicking in the textfield area (white).
        4) In the options menu select Motif Look and Feel (Windows Look and Feel works also).

        The following will be produced:
        java.lang.NullPointerException
                at javax.swing.plaf.basic.BasicComboBoxUI$2.focusLost(BasicComboBoxUI.java:587)
                at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:171)
                at java.awt.Component.processFocusEvent(Component.java:3087)
                at javax.swing.JComponent.processFocusEvent(JComponent.java:1500)
                at java.awt.Component.processEvent(Component.java:2990)
                at java.awt.Container.processEvent(Container.java:990)
                at java.awt.Component.dispatchEventImpl(Component.java:2394)
                at java.awt.Container.dispatchEventImpl(Container.java:1035)
                at java.awt.Component.dispatchEvent(Component.java:2307)
                at java.awt.LightweightDispatcher.processFocusEvent(Container.java:1778)
                at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1735)
                at java.awt.Container.dispatchEventImpl(Container.java:1022)
                at java.awt.Window.dispatchEventImpl(Window.java:749)
                at java.awt.Component.dispatchEvent(Component.java:2307)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:287)
                at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:101)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)

        I would appreciate fixes or work-arounds to this problem.

        Thanks
        (Review ID: 88260)
        ======================================================================

        *** Added description from bug 4272711

        Description:
        With jdk1.3-G when in the ComboBox tab, exception gets thrown when: Values are changed in the Editable ComboBox field, and then the Look and Feel is changed.

        Step to Reproduce:
        1)Go to latest SwingSet, ComboBox tab
        2)Change the value in the Editable CombBox
        3)Now change the look and feel of applet.
        4)Exception gets thrown
         javax.swing.plaf.basic.BasicComboBoxUI$EditorFocusListener.focusLost(BasicComboBoxUI.java:1369)
                at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:175)
                at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:174)
                at java.awt.Component.processFocusEvent(Component.java:3604)
                at javax.swing.JComponent.processFocusEvent(JComponent.java:2004)
                at java.awt.Component.processEvent(Component.java:3497)
                at java.awt.Container.processEvent(Container.java:1255)
                at java.awt.Component.dispatchEventImpl(Component.java:2563)
                at java.awt.Container.dispatchEventImpl(Container.java:1304)
                at java.awt.Component.dispatchEvent(Component.java:2466)
                at java.awt.LightweightDispatcher.setFocusRequest(Container.java:2169)
                at java.awt.Container.proxyRequestFocus(Container.java:1495)
                at java.awt.Container.proxyRequestFocus(Container.java:1490)
                at java.awt.Container.proxyRequestFocus(Container.java:1490)
                at java.awt.Container.proxyRequestFocus(Container.java:1490)
                at java.awt.Container.proxyRequestFocus(Container.java:1490)
                at java.awt.Component.requestFocus(Component.java:4132)
                at javax.swing.JComponent.grabFocus(JComponent.java:935)
                at javax.swing.JComponent.requestFocus(JComponent.java:918)
                at javax.swing.p

        zelony@eng 1999-09-16

              mdavidsosunw Mark Davidson (Inactive)
              skonchad Sandeep Konchady
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: