0

Hi everyone, I'm dealing with both JMenu and JPopupMenu in a program. Looks good except when I switch from JMenu to JPopupMenu by right click, it doesnt work. How? Many thanks.

4
Contributors
6
Replies
33
Views
4 Years
Discussion Span
Last Post by Petranilla
0

Need more info and the code that you think has to do that...
See if you assigned to your menu item the jpopmenu object.

0

Lucaci: Yes, JPopupMenu(by right click) from JMenu but it doen't change the background. It's actually a program to change background.Many thanks.
mKorbel: I'll check,the menus are display on both JMenu and JPopupMenu but it's not displaying the background.Many thanks.

0

JPopupMenu(by right click) from JMenu but it doen't change the background. It's actually a program to change background.

This, I don't get this.

What do you mean by

it doen't change the background

? Isn't the JPopomenu showing when you right click an item from your JMenu?

0

Do you mean background color? If so use this, tweek as needed:

myContentPanel.getContentPane().setBackground(Color.YourColorVariable_here);
myContentPanel.getContentPane().validate();
myContentPanel.getContentPane().repaint();

Edited by Banderson

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.