> Currently the bug described in the issue is that the colors of the 
> TextComponents do not change when setting TextComponents to uneditable. The 
> default uneditable color (SystemColor.control) happens to be the same as the 
> default for the editable color for some L&Fs, so the fix may not be initially 
> noticeable. However, the bug still exists where the the color is not being 
> changed when changing between editable and 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.

Alisen Chung has updated the pull request incrementally with one additional 
commit since the last revision:

  use getbackground

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19876/files
  - new: https://git.openjdk.org/jdk/pull/19876/files/0b0f049c..e83c29fe

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19876&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19876&range=01-02

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

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

Reply via email to