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

REGRESSION: Arabic Text Does Not Repaint Correctly After Being Selected

    XMLWordPrintable

    Details

      Description

      Name: jl125535 Date: 09/14/2004


      FULL PRODUCT VERSION :
      java version "1.5.0-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
      Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      NVIDIA GeForce4 MX 440 with AGP8X video card

      A DESCRIPTION OF THE PROBLEM :
      When Arabic text is used in a JTextPane or JTextArea it originally displays correctly. However when the users selects a range of text by dragging on a single line from right of screen to left of screen and back the text which becomes unselected while dragging back to the right does not repaint and a white space is left instead.

      This seems to occur in many situations where the arabic text becomes unselected but not all (noteably when dragging from left to right and back it does repaint correctly).

      Also note that the problem occurs in JTextPane when using text/plain or text/html and also in JTextArea.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Place a file with Arabic text in it at C:\test.html and then run the example source code (it is also possible to reproduce by typing in Arabic text but this is generally simpler). I'll send the actual file I'm testing with via email as it will be corrupted if sent via a web form.

      Create a selection by dragging from right to left and then reduce the size of the selection by dragging back to the right.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The text should have repainted correctly.
      ACTUAL -
      The text that became unselected was not repainted and was left white.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No error message was printed.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;
      import java.io.*;
      import java.net.*;

      public class ArabicRefresh {

          public static void main(String[] args) throws Exception {
           JFrame frame = new JFrame();
           JTextPane area = new JTextPane();
           area.setContentType("text/html");
           area.setPage(new File("C:\\test.html").toURL());
           frame.getContentPane().add(new JScrollPane(area));
           frame.pack();
           frame.show();
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      No workaround found.

      Release Regression From : 1.4.2
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Incident Review ID: 310605)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              peterz Peter Zhelezniakov
              Reporter:
              jleesunw Jon Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: