<Swing Dev> Integrated: 4710675: JTextArea.setComponentOrientation does not work with correct timing
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Fri Feb 26 06:22:44 UTC 2021
On Mon, 22 Feb 2021 09:45:31 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> It is seen JTextArea.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) orientation is not honoured if it is called after setText() and remain at LTR orientation. It changes the orientation only if some more text is typed additionally to existing text.
> This behaviour is different from JTextField where the RTL orientation is honoured from start.
> Proposed fix is to check for ComponentOrientation propertyChange event and set i18n property if it is not set, so that orientation is honoured as soon as setComponentOrientation() is called.
> Checked for all L&Fs in all supported platforms.
This pull request has now been integrated.
Changeset: bcca1006
Author: Prasanta Sadhukhan <psadhukhan at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/bcca1006
Stats: 129 lines in 2 files changed: 128 ins; 0 del; 1 mod
4710675: JTextArea.setComponentOrientation does not work with correct timing
Reviewed-by: serb, pbansal
-------------
PR: https://git.openjdk.java.net/jdk/pull/2673
More information about the swing-dev
mailing list