IllegalArgumentException when printing components with zero-length text

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 5.0
    • Affects Version/s: 5.0
    • Component/s: client-libs
    • None
    • b32
    • generic
    • generic

      The fix to [4352983: Clipping of text when printing] is causing an IllegalArgumentException when printing components with zero-length text. The root cause is that the TextLayout constructor does not support zero-length Strings.

      This causes a failure when trying to print a JTable that contains any empty table cells. It also causes the SwingSet2 JTable printing demo to fail. The cells containing ImageIcons have no text and trigger this problem.

      Attached is a test case that demonstrates the problem. It simply attempts to print a JLabel containing the empty String.

      Fixing this is VERY IMPORTANT for the new JTable printing support.

            Assignee:
            Igor Kushnirskiy (Inactive)
            Reporter:
            Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: