Hi All, I created a menubar, I just want to disable the menus, once I selected one of the menu items until I finish with that one( like in most windows applications, once we select a menuItem like File- new - the menus will be disabled until we are done ). I couldn�t find a method to disable the menubar. I know there is an option to disable the Frame. Is that the only option. Thanks in advance Roy
It isn't clear whether you are working in AWT or Swing. Let's start with AWT. Looking in the api, scroll down in the left lower frame to the MenuBar class and click on the link. Look down in the Methods and inherited methods blocks - sure enough, no setEnabled method.
Thanks for your reply. I am sorry I didn�t give the full information. Actually I am using swing. Yes I tried menuBar.setEnabled(false); but it is not working. I tried the other two, menuItem and menu and calling setEnabled(false) disable them, But I don�t know what is happening with menuBar. Am I doing something wrong? Since I want to disable the entire menubar I think if I can disable the menubar that will be the best choice. Any help Roy. [ January 18, 2004: Message edited by: Roy Augustine ]
Joined: Jan 14, 2004
You're right. I checked the JMenuBar api, finding setEnabled in the JComponent section. Following the link I find this in the method detail:
Note: Disabling a component does not disable it's children.
Looks like a dead end...
[ January 19, 2004: Message edited by: Craig Wood ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com