<Swing Dev> RFR: 4710675: JTextArea.setComponentOrientation does not work with correct timing [v3]

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Fri Feb 26 05:32:06 UTC 2021


> 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.

Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:

  Add comment

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2673/files
  - new: https://git.openjdk.java.net/jdk/pull/2673/files/efec94fc..54955c85

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2673&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2673&range=01-02

  Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2673.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2673/head:pull/2673

PR: https://git.openjdk.java.net/jdk/pull/2673


More information about the swing-dev mailing list