-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
6u10
-
x86
-
windows_vista
FULL PRODUCT VERSION :
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 6.0.6001
A DESCRIPTION OF THE PROBLEM :
When the first line indent of a paragraph in a JTextPane is set to a negative value, which is a valid call path resulting in the first line shifted to the left of subsequent lines, the text of that line becomes heavier than normal. I suspect this is due to double painting of the text.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Java Desktop Application in the Netbeans IDE
2. In Design Mode, drag-and-drop a JTextPane onto the frame.
3. In source mode, initialize the text pane with a first line indent of -5 and a left indent of 10 using setParagraphAttributes.
4. Set the font to Courier for a more pronounced effect.
5. Run the program.
6. Start typing in the text pane until you reach a page boundary, and the text wraps.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The weight of the text in the first line and subsequent lines is the same.
ACTUAL -
The weight of the text in the first line is heavier than the second.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Don't use negative first line indents.
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 6.0.6001
A DESCRIPTION OF THE PROBLEM :
When the first line indent of a paragraph in a JTextPane is set to a negative value, which is a valid call path resulting in the first line shifted to the left of subsequent lines, the text of that line becomes heavier than normal. I suspect this is due to double painting of the text.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a Java Desktop Application in the Netbeans IDE
2. In Design Mode, drag-and-drop a JTextPane onto the frame.
3. In source mode, initialize the text pane with a first line indent of -5 and a left indent of 10 using setParagraphAttributes.
4. Set the font to Courier for a more pronounced effect.
5. Run the program.
6. Start typing in the text pane until you reach a page boundary, and the text wraps.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The weight of the text in the first line and subsequent lines is the same.
ACTUAL -
The weight of the text in the first line is heavier than the second.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Don't use negative first line indents.