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

Wrong display while displaying HTML with Margins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • beta
    • x86
    • windows_nt



      Name: boT120536 Date: 01/16/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      JTextPane does not display the correct text wrapping for the HTML text if
      the
      pagewidth - ( leftmargin + rightmargin ) is less than (pagewidth/2).

        To reproduce the bug add following HTML to JTextPane-

      Following is a test HTML-

      <html>
        <head style="margin-top: 2.0">
          
        </head>
        <body width="562">
          <p style="margin-right: 133.0; margin-top: 2.0; margin-left: 237.0" width="562">
            0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
            6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
          </p>
          <p style="margin-top: 2.0">
            
          </p>
          <p style="margin-right: 300.0; margin-top: 2.0">
            0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
            6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
          </p>
          <p style="margin-top: 2.0">
            
          </p>
          <p style="margin-top: 2.0">
            
          </p>
          <p style="margin-right: 200.0; margin-top: 2.0; margin-left: 180.0">
            0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
            6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
          </p>
          <p style="margin-top: 2.0">
            
          </p>
          <p style="margin-top: 2.0">
            
          </p>
          <p style="margin-right: 194.0; margin-top: 2.0; margin-left: 150.0">
            0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
            6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
          </p>
          <p style="margin-top: 2.0">
            
          </p>
          <p style="margin-top: 2.0">
            
          </p>
        </body>
      </html>


      Please observe the width allowed for the text.
      (Review ID: 114061)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: