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

JLabel HTML text wraps in the middle of words containing change of style or font

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 5.0
    • client-libs

      FULL PRODUCT VERSION :
      java version "1.6.0_02"
      Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)

        Bug also applies to 1.4.1_07 and 1.5 versions

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP, Windows Vista

      A DESCRIPTION OF THE PROBLEM :
      JLabel set with text that contains HTML change of style tags like <b> <u> <font> wraps in the middle of a word. For example JLabel containing

      <html><b>Name</b>@domain.com</html>

      or

      <html>Hello@there<b>some</b>.com</html>

      would break-wrap to the next line before the <b> tag if space constraints are narrow enough. When this is used as a renderer in a table cell most of the text dissapears to the second line that is hidden leaving most of the text invisible. I'm trying to use the bold (or other style change tags) to highlight part of a word.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      <html><b>John</b>###@###.###</html>
      ACTUAL -
      John (in bold, the rest is missing in the hidden second line of a table cell)

      REPRODUCIBILITY :
      This bug can be reproduced always.

            peterz Peter Zhelezniakov
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: