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

REGESSION: JFileChooser displays garbage as Applet using WinXP LAF

XMLWordPrintable

    • b99
    • x86
    • windows_xp

      J2SE Version (please include all output from java -version flag):
        java version "1.6.0-rc"
        Java(TM) SE Runtime Environment (build 1.6.0-rc-b98)
        Java HotSpot(TM) Client VM (build 1.6.0-rc-b98, mixed mode, sharing)

      Does this problem occur on J2SE 1.3, 1.4.x or 1.5? Yes / No (pick one)

        NO. The bug does only occur, when the code is run as an applet.
        It works fine, when run as an application.

      Operating System Configuration Information (be specific):
        WinXP SP2

      Bug Description:

        JFileChooser displays garbage file selector and shows exception when using
        "UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());"
        on Windows XP SP2 (system LAF class name is
        com.sun.java.swing.plaf.windows.WindowsLookAndFeel ).


        However the file choose works fine but looks ugly.

        Attached a screenshot of the file chooser and a sample source code.
        The code runs as an applet and a standalone application.

      Steps to Reproduce (be specific):

        appletviewer.exe -J-Djava.security.policy=all.policy capFilechooser.html


      Stack trace

      Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
          at com.sun.java.swing.plaf.windows.WindowsButtonUI.paintXPButtonBackground(WindowsButtonUI.java:226)
          at com.sun.java.swing.plaf.windows.WindowsToggleButtonUI.paint(WindowsToggleButtonUI.java:118)
          at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
          at javax.swing.JComponent.paintComponent(JComponent.java:758)
          at javax.swing.JComponent.paint(JComponent.java:1022)
          at javax.swing.JComponent.paintChildren(JComponent.java:859)
          at javax.swing.JComponent.paint(JComponent.java:1031)
          at javax.swing.JComponent.paintChildren(JComponent.java:859)
          at javax.swing.JComponent.paint(JComponent.java:1031)
          at javax.swing.JComponent.paintChildren(JComponent.java:859)
          at javax.swing.JComponent.paint(JComponent.java:1031)
          at javax.swing.JComponent.paintChildren(JComponent.java:859)
          at javax.swing.JComponent.paint(JComponent.java:1031)
          at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
          at javax.swing.JComponent.paintChildren(JComponent.java:859)
          at javax.swing.JComponent.paintToOffscreen(JComponent.java:5111)
          at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
          at javax.swing.RepaintManager.paint(RepaintManager.java:1132)
          at javax.swing.JComponent.paint(JComponent.java:1008)
          at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
          at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
          at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
          at java.awt.Container.paint(Container.java:1797)
          at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:738)
          at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:683)
          at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:663)
          at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
          at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
          at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
          at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
          at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
          at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
          at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
          at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
          at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

            idk Igor Kushnirskiy (Inactive)
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: