I got JCheckBoxMenuItem, but i don’t know how to make it useful. When you checked a JCheckBoxMenuItem, then it shows Toolbar and if it is not checked not show it.
if(Toolbarbox.isSelected()==true) // if check box is checked
Toolbar.setEnabled(true); //enable Jpanel
else // if check box unchecked
Toolbar.setEnabled(false); //disable Jpanel
i am using that code but it not work, any solutions?
THANKS FOR ANSWERS
you should change the body of your function like this: