简体   繁体   中英

Get “fat header” background color in Swing

I'm building a Swing app in which I'd like to put a "fat header" as in this image:

在此处输入图片说明

Is there a nice way to get the native system colour for that background area? So on Ubuntu with a default theme I'd like to get the colour in the image, but for other themes, and on Windows, I'd also like to have something sensible. I'm using the native Look & Feel.

例如 ,FatHeader可能是JMenuBar或带有GradientPaint JPanel (非常简单,是从JButton's JComponents获取此Gradient[]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM