开发者

JToolbar is hidden by JMenu

开发者 https://www.devze.com 2022-12-30 05:47 出处:网络
I\'m开发者_JAVA技巧 using Netbeans to add a JToolbar to my window which also has a JMenuBar. Here is the design-time look:

I'm开发者_JAVA技巧 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号