Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how would I control size of jmenuitem in jmenubar

843804Jun 27 2005 — edited Sep 29 2005
I have the following

JMenuBar bar = new JMenuBar();
JMenuItem printItem = new JMenuItem("Print");
printItem.addActionListener(....);
bar.add(printItem);

the problem however is that the menu item takes up much of the menubar. Is there a way to control the size of it so that it appears like the JMenu components? I dont wish to use jtoolbar because the items in the menu are placed in buttons. I would like to maintain the look of a menubar

Thank you all
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2005
Added on Jun 27 2005
9 comments
221 views