Question

I'm using Netbeans to add a JToolbar to my window which also has a JMenuBar. Here is the design-time look: alt text http://www.theinfernals.org.uk/misc/design.png

.. but during run-time I get this:

alt text http://www.theinfernals.org.uk/misc/runtime.png

With the toolbar seemingly partially hidden under the menu names. This is on the Mac, btw. Is there something stupid I've forgotten to do or some layout trick I should be using?

EDIT: I'll add that the area below the toolbar is a SplitContainer.

Was it helpful?

Solution

I think that the problem might actually be that the toolbar object is not unber the menu(which is highly unlikely since the menubar is not part of the content pane of a frame), but too small. You can simply use setMinimalSize on the toolbar object after initComponents() or set a minimum size for the toolbar in the component's preferences in Matisse.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top