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

Printing JTable in Windows L&F throws InternalError: HTHEME is null

    XMLWordPrintable

Details

    • b04
    • 22
    • b20
    • windows

    Description

      javax/swing/JTable/JTableScrollPrintTest.java throws java.lang.InternalError: HTHEME is null in WindowsLookAndFeel . This works fine in default look and feel. This test was added as part of JDK-8210807 fix.

      ----------System.err:(65/5084)----------
      java.lang.reflect.InvocationTargetException
              at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1371)
              at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1346)
              at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1480)
              at JTableScrollPrintTest.main(JTableScrollPrintTest.java:57)
              at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
              at java.base/java.lang.reflect.Method.invoke(Method.java:580)
              at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
              at java.base/java.lang.Thread.run(Thread.java:1570)
      Caused by: java.lang.InternalError: HTHEME is null
              at java.desktop/sun.awt.windows.ThemeReader.paintBackground(Native Method)
              at java.desktop/sun.awt.windows.ThemeReader.paintBackground(ThemeReader.java:188)
              at java.desktop/com.sun.java.swing.plaf.windows.XPStyle$SkinPainter.paintToImage(XPStyle.java:716)
              at java.desktop/sun.swing.CachedPainter.getImage(CachedPainter.java:175)
              at java.desktop/sun.swing.CachedPainter$PainterMultiResolutionCachedImage.getResolutionVariant(CachedPainter.java:320)
              at java.desktop/sun.java2d.SunGraphics2D.getResolutionVariant(SunGraphics2D.java:3305)
              at java.desktop/sun.java2d.SunGraphics2D.drawHiDPIImage(SunGraphics2D.java:3133)
              at java.desktop/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3421)
              at java.desktop/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3405)
              at java.desktop/sun.print.PeekGraphics.drawImage(PeekGraphics.java:960)
              at java.desktop/sun.swing.CachedPainter.paintImage(CachedPainter.java:249)
              at java.desktop/sun.swing.CachedPainter.paint0(CachedPainter.java:217)
              at java.desktop/sun.swing.CachedPainter.paint(CachedPainter.java:114)
              at java.desktop/com.sun.java.swing.plaf.windows.XPStyle$Skin.paintSkinRaw(XPStyle.java:653)
              at java.desktop/com.sun.java.swing.plaf.windows.AnimationController.paintSkin(AnimationController.java:255)
              at java.desktop/com.sun.java.swing.plaf.windows.XPStyle$Skin.paintSkin(XPStyle.java:629)
              at java.desktop/com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.paint(WindowsTableHeaderUI.java:221)
              at java.desktop/javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:170)
              at java.desktop/javax.swing.plaf.basic.BasicTableHeaderUI.paintCell(BasicTableHeaderUI.java:744)
              at java.desktop/javax.swing.plaf.basic.BasicTableHeaderUI.paint(BasicTableHeaderUI.java:683)
              at java.desktop/javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
              at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:852)
              at java.desktop/javax.swing.JComponent.paint(JComponent.java:1128)
              at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:961)
              at java.desktop/javax.swing.JComponent.paint(JComponent.java:1137)
              at java.desktop/javax.swing.JViewport.paint(JViewport.java:740)
              at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:961)
              at java.desktop/javax.swing.JComponent.paint(JComponent.java:1137)
              at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:961)
              at java.desktop/javax.swing.JComponent.paint(JComponent.java:1137)
              at JTableScrollPrintTest$PrintUtilities.print(JTableScrollPrintTest.java:180)
              at java.desktop/sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:2280)
              at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1659)
              at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1489)
              at JTableScrollPrintTest$PrintUtilities.print(JTableScrollPrintTest.java:145)
              at JTableScrollPrintTest.initialize(JTableScrollPrintTest.java:85)
              at JTableScrollPrintTest.lambda$main$0(JTableScrollPrintTest.java:59)
              at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
              at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
              at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
              at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
              at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
              at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
              at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
              at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
              at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
              at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
              at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
              at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
              at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)


      =================================================
      I am able to reproduce this issue on Windows 11 Pro

      Attachments

        Issue Links

          Activity

            People

              tr Tejesh R
              landrews Lawrence Andrews
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: