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

Not normal TextArea's getSelectedText() method, by use Duble-byte charactor.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.3
    • client-libs
    • x86
    • windows_95



      Name: rlT66838 Date: 07/21/97


      TextArea's getSelectedText() method, use single-byte charactor is normal.
      But, use duble-byte charactor(japanese) is not normal.

      Example:
      String st = TextArea.getSelectedText();
      4th duble-byte charactor(japanese) on TextArea. Select 2th duble-byte charactor(japanese) is normal.
      But,Select 2th duble-byte charactor(japanese) is flow message print.

      Exception occurred during event dispatching:
      java.lang.StringIndexOutOfBoundsException: String index out of range: 8
       at java.lang.String.substring(String.java:1046)
       at java.awt.TextComponent.getSelectedText(TextComponent.java:122)

      ======================================================================

            ehawkessunw Eric Hawkes (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: