0

Hi, I nead to do some menu in gui Netbeans. I have got buttons, and a nead to change one JPanel in witch is some others components.
Could you help me how to change JPanels? or some another way to do menu? i'm not good at it :(

2
Contributors
3
Replies
7
Views
7 Years
Discussion Span
Last Post by javaAddict
0

Thanks, that I've got. But problem is, how to change space under menu.. I can make some JPanel form, but how to write to action(jMenu1ActionPerformed) to display some JPanel, and to klick to another menu button to display another one.. I can't do it...

0

I assume that you can add an actionlistener to the menuItem using the addActionListener method. Look the API. When the menu is selected the actionPerformed method of the ActionListener is automatically called.

I believe that there is a remove method that removes components from the JFrame. I have never used it before, but I believe that if you add a JPanel to the JFrame and then you call the remove method with argument the same JPanel, it will be removed.

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.