<Swing Dev> [13] RFR JDK-8212904:JTextArea line wrapping incorrect when using UI scale
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Mon Mar 25 18:32:22 UTC 2019
On 25/03/2019 02:05, Prasanta Sadhukhan wrote:
> Thanks Sergey for the pointer. But horizontal scrollbar is not visible for both correct and broken wrap if scrollbar policy is set to HORIZONTAL_SCROLLBAR_AS_NEEDED.
> Also, the textArea.getHeight() is same for both textArea.setWrapStyleWord( true ) and not. Attached is the automated testcase I tried.
In the test above the case for doWrapOffTest() still uses setLineWrap(true) which disable scroll bar, if you drop it the scrollbar will be visible.
As of the height, you need to read the value a little bit later, not immediately after "frame.setVisible", for example if you read these values at lines 75,76 you will get something like that:
textArea.getHeight() = 3216
textArea1.getHeight() = 1616
--
Best regards, Sergey.
More information about the swing-dev
mailing list