On Tue, 6 Aug 2024 09:25:55 GMT, Prasanta Sadhukhan <[email protected]> wrote:
>> This call is only to get the default background of TextArea. Is there >> another way to grab the default color without using UIManager? > > Yes, but as far I could see `TextArea.background` property is being set in > `AquaLookAndFeel.java, MotifLookAndFeel.java, BasicLookAndFeel.java, > XAWTLookAndFeel.java and WindowsLookAndFeel.java` > and this L&F will not be set in AWT environment, if I am not wrong so you > will either get garbage or wrong default color if you use > UIManager.getColor..so I guess you need to use > `TextComponent.getBackground()` which returns SystemColor.control if nothing > is set i've made the change to use TextComponent.getBackground() instead to get the correct background color ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19876#discussion_r1708330280
