How to disable JMenuBar and JToolBar

I am in a JInternalFrame which was opened within a JDesktopPane which is in a JFrame, and this JFrame has a JMenuBar and a JToolBar.

How can I enable/disable this 2 components?

I tried something like:

((JInternalFrame)this).getDesktopPane().get............

But nothig.

[353 byte] By [Franziska] at [2007-11-26 21:04:08]
# 1
I have not tried this, butthis.getDesktopPane().getRootPane().getJMenuBar()should work.
java_knighta at 2007-7-10 2:37:02 > top of Java-index,Desktop,Core GUI APIs...
# 2
Can't you just hide/show using the setvisible(boolean) property?
JP01a at 2007-7-10 2:37:02 > top of Java-index,Desktop,Core GUI APIs...