java.lang.IllegalArgumentException: Zero length string passed to TextLayout cons tructor.

Oracle Community | 807587 | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Printing to a PDF

    Oracle Community | 1 decade ago | 807587
    java.lang.IllegalArgumentException: Zero length string passed to TextLayout cons tructor.

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Zero length string passed to TextLayout cons tructor.

      at java.awt.font.TextLayout.<init>()
    2. Java RT
      WPanelPeer.print
      1. java.awt.font.TextLayout.<init>(TextLayout.java:471)
      2. sun.java2d.pipe.OutlineTextRenderer.drawString(OutlineTextRenderer.java:67)
      3. sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:32)
      4. sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2534)
      5. sun.print.ProxyGraphics2D.drawString(ProxyGraphics2D.java:720)
      6. javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt(BasicGraphicsUtils.java:234)
      7. javax.swing.plaf.basic.BasicLabelUI.paintEnabledText(BasicLabelUI.java:81)
      8. javax.swing.plaf.basic.BasicLabelUI.paint(BasicLabelUI.java:164)
      9. javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
      10. javax.swing.JComponent.paintComponent(JComponent.java:541)
      11. javax.swing.JComponent.printComponent(JComponent.java:908)
      12. javax.swing.JComponent.paint(JComponent.java:812)
      13. javax.swing.JComponent.print(JComponent.java:891)
      14. javax.swing.JComponent.paintChildren(JComponent.java:651)
      15. javax.swing.JComponent.printChildren(JComponent.java:921)
      16. javax.swing.JComponent.paint(JComponent.java:820)
      17. javax.swing.JComponent.print(JComponent.java:891)
      18. javax.swing.JComponent.paintChildren(JComponent.java:651)
      19. javax.swing.JComponent.printChildren(JComponent.java:921)
      20. javax.swing.JComponent.paint(JComponent.java:820)
      21. javax.swing.JComponent.print(JComponent.java:891)
      22. javax.swing.JComponent.paintChildren(JComponent.java:651)
      23. javax.swing.JComponent.printChildren(JComponent.java:921)
      24. javax.swing.JComponent.paint(JComponent.java:820)
      25. javax.swing.JLayeredPane.paint(JLayeredPane.java:557)
      26. javax.swing.JComponent.print(JComponent.java:891)
      27. javax.swing.JComponent.paintChildren(JComponent.java:651)
      28. javax.swing.JComponent.printChildren(JComponent.java:921)
      29. javax.swing.JComponent.paint(JComponent.java:820)
      30. javax.swing.JComponent.print(JComponent.java:891)
      31. java.awt.GraphicsCallback$PrintCallback.run(GraphicsCallback.java:32)
      32. sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
      33. sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
      34. java.awt.Container.print(Container.java:1367)
      35. sun.awt.windows.WComponentPeer.print(WComponentPeer.java:223)
      36. sun.awt.windows.WCanvasPeer.print(WCanvasPeer.java:97)
      37. sun.awt.windows.WPanelPeer.print(WPanelPeer.java:26)
      37 frames