Menu

#5 NPE within Windows UI on Vista

open
nobody
None
5
2007-03-05
2007-03-05
K. Graul
No

NPE after "new MDateEntryField();" with Java 1.6.0 on Windows Vista:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.sun.java.swing.plaf.windows.WindowsComboBoxUI$XPComboBoxButton.<init>(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsComboBoxUI.createArrowButton(Unknown Source)
at mseries.plaf.Windows.WindowsDateEntryUI$ComboBoxUI.createArrowButton(WindowsDateEntryUI.java:64)
at mseries.plaf.Windows.WindowsDateEntryUI.createArrowButton(WindowsDateEntryUI.java:55)
at mseries.plaf.basic.BasicDateEntryUI.installComponents(BasicDateEntryUI.java:154)
at mseries.plaf.basic.BasicDateEntryUI.installUI(BasicDateEntryUI.java:79)
at javax.swing.JComponent.setUI(Unknown Source)
at mseries.ui.MDateEntryField.updateUI(MDateEntryField.java:100)
at mseries.ui.MDateEntryField.<init>(MDateEntryField.java:78)
at mseries.ui.MDateEntryField.<init>(MDateEntryField.java:57)

Discussion

  • shijq

    shijq - 2007-05-23

    Logged In: YES
    user_id=1800010
    Originator: NO

    I have the same problem when I set plaf as "Windows" on windows xp.

    Java Web Start 1.6.0_01
    Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\abc
    ----------------------------------------------------
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at com.sun.java.swing.plaf.windows.WindowsComboBoxUI$XPComboBoxButton.getState(Unknown Source)
    at com.sun.java.swing.plaf.windows.XPStyle$GlyphButton.paintComponent(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JLayeredPane.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintToOffscreen(Unknown Source)
    at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
    at javax.swing.RepaintManager.paint(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

     
  • Michael Hyde

    Michael Hyde - 2007-06-19

    Logged In: YES
    user_id=1811194
    Originator: NO

    Tested on the following systems:

    FAILED : Java 1.6.0_01; Windows XP Pro SP2; Display Properties Theme "Windows XP"
    Ok : Java 1.6.0_01; Windows XP Pro SP2; Display Properties Theme "Windows Classic"
    Ok : Java 1.6.0_01; Windows 2000 SP4

    FAILED : Java 1.5.0_12; Windows XP Pro SP2; Display Properties Theme "Windows XP"
    Ok : Java 1.5.0_12; Windows XP Pro SP2; Display Properties Theme "Windows Classic"

    Ok : Java 1.5.0_11; Windows XP Pro SP2; Display Properties Theme "Windows XP"

    I use this code in a JNLP app. A workaround I found for me was to install Java 1.5.0_11 (found under "Archived Products" from Sun site), and then disable the 1.6 JRE via the Java Control Panel. Open the Java Control Panel, select the "Java" tab, and then click the "View..." button for Java Application Runtime Settings. You can enable/disable any of the known JREs there.

    Best regards.

     

Log in to post a comment.

Auth0 Logo