Bug #2392

MENUS: Top-Level Menu - need centralized way to remove menubar

Added by Matthew Brooke over 16 years ago. Updated over 16 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Some dialogs need to be shown without menubars (eg Welcome Window, Query Builder
dialog). We therefore need centralized way to remove the menubar, so the code
for these dialogs can do so without havign to worry too much about threading
issues etc (since the Kepler menus are not added until an observing thread sees
that the ptii menus have been completely rendered).

Notes from IRC as a reminder to me: ================================
Mar 27 16:32:30 mbHome nandita
Mar 27 16:33:15 mbHome all you need to do is call the JFrame method
"setJMenuBar()" and pass it null as the JMenuBar value
Mar 27 16:33:41 mbHome the only issue is getting this to happen at the right
time, since the menu bar is added in a separate thread
Mar 27 16:34:09 nandita ok
Mar 27 16:34:36 mbHome see src/exp/ptolemy/vergil/basic/
Mar 27 16:34:49 mbHome the public void run() method
Mar 27 16:35:17 mbHome waits for a frame to display before it removes the ptii
menubar and adds the kepler menubar instead
Mar 27 16:35:32 mbHome that code will be similar to what you want to do, i think ================================

Related issues

Blocked by Kepler - Bug #2337: TRACKING - MENUS: Top-Level Menu RevisionIn Progress01/18/2006


#1 Updated by Matthew Brooke over 16 years ago

There is already a way to do this - all you need to do is call hideMenuBar() (which is a public method in ptolemy.gui.Top - of which the frame you're workign in should be a descendent). This call would typically be in the constructor of your frame class

#2 Updated by Redmine Admin over 9 years ago

Original Bugzilla ID was 2392

Also available in: Atom PDF