mgarin / weblaf

WebLaF is a fully open-source Look & Feel and component library written in pure Java for cross-platform desktop Swing applications.
http://weblookandfeel.com
GNU General Public License v3.0
1.13k stars 234 forks source link

How to change the background color of popupMenu selection item #684

Open xcfdszzr opened 2 years ago

xcfdszzr commented 2 years ago

image

mgarin commented 2 years ago

You can only change it via adjusting default menu item style or creating a custom one and applying to the specific item instance. If you aren't familiar with how WebLaF styling works - I recommend reading this wiki article: https://github.com/mgarin/weblaf/wiki/Styling-introduction

The default style of menu item can be found here: https://github.com/mgarin/weblaf/blob/master/modules/ui/src/com/alee/skin/light/resources/menuitem.xml