JMenu and JMenuItems have thin orange border that I cannot change
I have been using the UIManager
to change the coloring scheme on my GUI. For example I use this for JMenuItems
:
UIManager.put("MenuItem.foreground", new ColorUIResource(255, 255, 255));
UIManager.put("MenuItem.background", new ColorUIResource(51, 51, 51));
UIManager.put("MenuItem.selectionBackground", new ColorUIResource(232, 232, 232));
Fo开发者_开发技巧r some unknown reason, a 1 pixel orange border appears around my JMenuItems
and JMenus
. I don't understand why and I checked all the keys from http://www.devdaily.com/java/java-uimanager-color-keys-list. Does anybody know how to change the color that borders the JMenuItems
and JMenus
? If it can't be done with the UIManager
that is fine for a solution too.
well i dig into it for a while didn't find a fine answer so that what i did, jmnenu.getpopupmenu().setborder(border); // choose a border you can choose the color for it or the size of it that the best i could come with in an easy solution hope it helps if not for you for someone else
精彩评论