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

GTK L&F: NPE thrown when using SCROLL_TAB_LAYOUT

    Details

    • Subcomponent:
    • Introduced In Version:
      7
    • Resolved In Build:
      b07
    • CPU:
      generic, sparc
    • OS:
      generic, solaris
    • Verification:
      Verified

      Backports

        Description

        Run the attached TabbedPaneDemo.java testcase on the latest Swing nightly build:
        % java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel TabbedPaneDemo

        The testcase will fail to display and throws exceptions like the following:
        Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
               at com.sun.java.swing.plaf.gtk.GTKStyle.get(GTKStyle.java:713)
               at javax.swing.plaf.synth.SynthStyle.getInt(SynthStyle.java:952)
               at javax.swing.plaf.synth.SynthArrowButton$SynthArrowButtonUI.getPreferredSize(SynthArrowButton.java:95)
               at javax.swing.JComponent.getPreferredSize(JComponent.java:1628)
               at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneScrollLayout.layoutContainer(BasicTabbedPaneUI.java:3042)
               at java.awt.Container.layout(Container.java:1432)
               at java.awt.Container.doLayout(Container.java:1421)
               at java.awt.Container.validateTree(Container.java:1519)
               at java.awt.Container.validateTree(Container.java:1526)
               at java.awt.Container.validateTree(Container.java:1526)
               at java.awt.Container.validateTree(Container.java:1526)
               at java.awt.Container.validateTree(Container.java:1526)
               at java.awt.Container.validateTree(Container.java:1526)
               at java.awt.Container.validate(Container.java:1491)
               at java.awt.Window.pack(Window.java:674)
               at TabbedPaneDemo.createAndShowGUI(TabbedPaneDemo.java:104)
               at TabbedPaneDemo.access$000(TabbedPaneDemo.java:21)
               at TabbedPaneDemo$1.run(TabbedPaneDemo.java:113)
               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)

        This is reproducible with Swing's nightly build from 2006-10-20 and later.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  campbell Christopher Campbell (Inactive)
                  Reporter:
                  campbell Christopher Campbell (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: