-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5
-
None
-
x86, sparc
-
solaris_2.6, windows_95, windows_nt
Name: sg39081 Date: 08/15/97
The following is in one of my program. When this code is applied
on the first line of the TextArea, everything works fine. But
on the second line, it returns the selection one character after
whatever was marked. On the third line, it returns the selection,
two characters afterward. And so on for each line down.
TextArea text = new TextArea (20, 10);
String str = new String (text.getSelectedText ());
str = str.toUpperCase ();
text.replaceRange (str,
text.getSelectionStart (),
text.getSelectionEnd ());
I speculate that Windows' multi-line entry field generates
CR/LF at the end-of-line, which is two characters, while
JDK does not take that into account.
company - Cynosure.X International , email - ###@###.###
======================================================================
- duplicates
-
JDK-4070398 TextComponent.getSelectedText() does not work on Windows NT (Sparc - o'k)
- Closed
-
JDK-4028910 Text area caret position is incorrect
- Closed
-
JDK-4028474 java.awt.TextArea.replaceRange(String,int,int)
- Closed
-
JDK-4030931 TextArea.getSelectedText(), getSelectionStart(), getSelectionEnd() return incorr
- Closed
-
JDK-4050832 Incorrect indexing in TextArea when using indexOf()
- Closed
-
JDK-4061733 TextArea.setCaretPosition() does not work properly if textarea contains newline
- Closed
-
JDK-4062646 TextComponent.getCaretPosition() treats VK_ENTER characters as if they were 2 ch
- Closed
-
JDK-4065144 Modal dialog bug
- Closed
-
JDK-4067050 The caret position of a TextComponent is wrong (counting the '\r's too).
- Closed
-
JDK-4070309 TextComponent.getSelectedText() probem on NT/95
- Closed
-
JDK-4055984 selections of TextArea are not correct
- Closed
-
JDK-4066587 TextArea/Field: selectAll can not select all entry if multibyte is used
- Closed