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

Swing text components printed with spaces between chars

    XMLWordPrintable

Details

    • b110
    • generic
    • generic

    Backports

      Description

        Swing text comp printed with unexpected spaces between chars, possible
        6488219 regression.

        Other (swing/java.awt.print issue, bad text/label printout result)
        General description of the problem
          Customer is migrating an applet from 1.3 to 6. When some applet is printed
        using java.awt.print.* and Printable interface, some text (JLabel or JList)
        is printed with unexpected spaces between characters, as if the text is
        expanded to span evenly in its bounds.

        Following is an example of label of 9 chars width. With 1.3, the label "abc"
        is printed as left-justified, but on 6u37, characters are printed as if "a
        b c". Same thing happens with a JList.
        On display, they are shown as left justified (same as 1.3 case)

        |abc | // 1.3
        |a b c| // 6u37

        Attachments

          1. On Screen.jpg
            On Screen.jpg
            27 kB
          2. Printed Now.jpg
            Printed Now.jpg
            33 kB
          3. Should be printed.jpg
            Should be printed.jpg
            34 kB
          4. SimplePrint2.java
            9 kB

          Issue Links

            Activity

              People

                anashaty Anton Nashatyrev (Inactive)
                anashaty Anton Nashatyrev (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: