On Tue, 25 Jun 2024 04:05:00 GMT, Alisen Chung <ach...@openjdk.org> wrote:

> Currently the bug described in the issue is that the colors of the 
> TextComponents do not change when set ySystemColor.control color when the 
> TextComponents are set to uneditable. You can check by changing 
> TextComponent.getBackground() code to return Color.GRAY on line 342 and you 
> can see that TextComponents are not changing to a gray background when set to 
> uneditable.
> 
> This fix adds a private setBackground method in TextComponent so that 
> TextArea and TextField can change the background color to the correct color 
> (SystemColor.control) when set uneditable by overriding the TextComponent 
> setEditable. You can verify the fix by changing this color to Color.GRAY and 
> verifying the backgrounds change to gray when the TextComponents are disabled.

src/java.desktop/share/classes/java/awt/TextComponent.java line 366:

> 364:         super.setBackground(c);
> 365:     }
> 366: 

Does this need a method need a javadoc comment block like the `setBackground` 
method before it or like any of the methods in the class?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19876#discussion_r1664665242

Reply via email to