-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
6
-
Cause Known
-
generic
-
generic
TextArea.setText() works incorrectly if text contains escape characters- \r or \b.
FULL PRODUCT VERSION :
java version "awt.pit-awt-blade-2004-09-29-Wed-int.mustang"
Java(TM) 2 Runtime Environment, Standard Edition (build awt.pit-awt-blade-2004-09-29-Wed-int.mustang)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b05, mixed mode)
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
SunOS client21 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Blade-100
A DESCRIPTION OF THE PROBLEM :
If a TextArea contains backspace(ie.\b, carriage return (i.e \r), the text set into the text area ignores the escape character effect in the text.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Compile the source code (Test.java)
2. Run the test class (java Test)
3. Observe the output in the text areas and at the command prompt.
EXPECTED VERSUS ACTUAL BEHAVIOR :
ACTUAL -
A window is shown with 2 TextAreas:
textArea1 containing containing ab cd.(There is a garbage character in between b and c instead of the \b) and
textArea2 containing abcd.
EXPECTED -
textArea1 show contain abcd and
textArea2 containing ab
This behaviour is not documented in the api for setText method call, in the absence of which the user will assume that the text printed at the command prompt and in the text area should be same -which is not so right now.
###@###.### 10/8/04 07:17 GMT
FULL PRODUCT VERSION :
java version "awt.pit-awt-blade-2004-09-29-Wed-int.mustang"
Java(TM) 2 Runtime Environment, Standard Edition (build awt.pit-awt-blade-2004-09-29-Wed-int.mustang)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b05, mixed mode)
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
SunOS client21 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Blade-100
A DESCRIPTION OF THE PROBLEM :
If a TextArea contains backspace(ie.\b, carriage return (i.e \r), the text set into the text area ignores the escape character effect in the text.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Compile the source code (Test.java)
2. Run the test class (java Test)
3. Observe the output in the text areas and at the command prompt.
EXPECTED VERSUS ACTUAL BEHAVIOR :
ACTUAL -
A window is shown with 2 TextAreas:
textArea1 containing containing ab cd.(There is a garbage character in between b and c instead of the \b) and
textArea2 containing abcd.
EXPECTED -
textArea1 show contain abcd and
textArea2 containing ab
This behaviour is not documented in the api for setText method call, in the absence of which the user will assume that the text printed at the command prompt and in the text area should be same -which is not so right now.
###@###.### 10/8/04 07:17 GMT
- relates to
-
JDK-5025532 TextArea.replaceRange() works incorrectly if text contains line separators
-
- Closed
-