문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top