[jdk20] RFR: 8299077: [REDO] JDK-4512626 Non-editable JTextArea provides no visual indication of keyboard focus

Alexander Zuev kizune at openjdk.org
Wed Dec 21 21:07:49 UTC 2022


On Wed, 21 Dec 2022 17:00:47 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> When the caret doesn't need to blink because the component is read-only, we call the public method `setBlinkRate` to set the rate to 0. At the same time, `getBlinkRate` continues to return non-zero value. This is confusing.
> 
> I propose introducing a protected method which would handle the internal state. This way changing blink rate because the text component changes its state from editable to non-editable and back would be hidden inside the class, and `getBlinkRate` would always return the rate which was set by the most recent call to `setBlinkRate`.
> 
> This can be handled as part of [JDK-8298602](https://bugs.openjdk.org/browse/JDK-8298602) or _separately_.

I'm going to put it into the comment section of the [JDK-8298602](https://bugs.openjdk.org/browse/JDK-8298602) so it is not lost to whoever will do the implementation on it.

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

PR: https://git.openjdk.org/jdk20/pull/68



More information about the client-libs-dev mailing list