RFR: 4512626: Non-editable JTextArea provides no visual indication of keyboard focus

Phil Race prr at openjdk.org
Tue Nov 29 18:23:23 UTC 2022


On Tue, 29 Nov 2022 07:30:32 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

> Set the text caret to be visible but not blinking on the non-editable text area.

Hmm. This is a pretty broad change.
It applies to any Swing component that accepts a caret as far as I can tell, and is broader than A11Y, so I worry about unexpected consequences.
What is the situation today for a JTextField - and other such components ? Why was the bug report mentioning only JTextArea ?
What happens for AWT heavyweights ? Does Windows display a caret even if they aren't editable ?
Why is a non-editable Text Area really any different than a JLabel ?? Surely that can't get focus ?
I guess I am surprised that that a non-editable component should have focus at all .. so what other components accept focus even if they aren't "active" ?

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

PR: https://git.openjdk.org/jdk/pull/11408



More information about the client-libs-dev mailing list