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

Phil Race prr at openjdk.org
Tue Nov 29 18:26:21 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.

src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java line 386:

> 384:                     setBlinkRate(savedBlinkRate);
> 385:                     savedBlinkRate = 0;
> 386:                 }

My general questions need to be addressed first, but after we get past that you need to revisit this code.
It seems to overlook that an application could change the blink rate itself, and restores the saved rate over what
the application has set.

Also, SFAICT setBlinkRate() doesn't seem to be preventing negative values ...

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

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



More information about the client-libs-dev mailing list