How can I set custom background color for JMenuBar and JMenu objects inside it? I tried .setBackgroundColor and it does not work!
JMenuBar
JMenu
.setBackgroundColor
Simple way to do is by .setBackground(Color.RED) and setOpaque(true)
.setBackground(Color.RED)
setOpaque(true)
menubar.setBackground(Color.RED); menu.setBackground(Color.yellow); menubar.setOpaque(true); menu.setOpaque(true);
This will give the color of your choices to both the menubar and menu.