<Swing Dev> [9] Review Request: 8078149 [macosx] The text of the TextArea is not wrapped at word boundaries
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed May 6 19:08:46 UTC 2015
Hello.
Please review the fix for a small fix.
This is the problem in lwawt, which was fixed in xawt already:
https://bugs.openjdk.java.net/browse/JDK-4992455
" 1. About line wrapping property.
"JTextArea has a bound property for line wrapping that controls
whether or not it will wrap lines. By default, the line
wrapping property is set to false (not wrapped)."
2. About wrapping style property.
"If set to true the lines will be wrapped at word boundaries
(whitespace) if they are too long to fit within the allocated
width. If set to false, the lines will be wrapped at character
boundaries. By default this property is false."
Since we use JTextArea in XAWT as the TextArea component we
should use the following code if we want to wrap lines at word
boundaries:
jtext.setLineWrap(true);
jtext.setWrapStyleWord(true);
"
Bug: https://bugs.openjdk.java.net/browse/JDK-8078149
Webrev can be found at: http://cr.openjdk.java.net/~serb/8078149/webrev.00
--
Best regards, Sergey.
More information about the swing-dev
mailing list