<Swing Dev> RFR: 8251377: [macos11] JTabbedPane selected tab text is barely legible [v4]

Alan Snyder javalists at cbfiddle.com
Fri Dec 18 23:26:21 UTC 2020


Just to be clear, there is no Apple API whose purpose is to reveal the color that AppKit uses to paint the text in a tab.
Any color choice you make, literal or symbolic, will either be wrong now or sometime in the future, or both.

Trying to deduce the color by analyzing an actual native view might work, but it is not guaranteed to work forever.
Apple’s commitment to faithful rendering of views into images has been decreasing over the years, I’m sorry to say.

  Alan


> On Dec 18, 2020, at 2:43 PM, Sergey Bylokhov <serb at openjdk.java.net> wrote:
> 
> On Fri, 18 Dec 2020 22:23:24 GMT, Phil Race <prr at openjdk.org> wrote:
> 
>> So why would this API return the wrong colour ?
> 
> That method used in the last version returns the color which is not the color of the tabpane. It is a similar color in some cases, but not always.
> 
> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/1182
> 



More information about the swing-dev mailing list