Article View: borland.public.jbuilder.java.swing
Article #13312Adding a JComponent to a JToolBar
From: Matthew Krevs
Date: Fri, 07 Aug 1998 00:00
Date: Fri, 07 Aug 1998 00:00
16 lines
1030 bytes
1030 bytes
Has anyone had any success with adding, for example, a JComboBox as an element of a JToolBar. I can get the JComboBox to display but it always aligns itself with the top margin of the toolbar and looks really poxy. The toolbar also increases in size vertically when the JComboBox is added. I cant work out how to centre the JComboBox vertically within the toolbar. I have tried setAlignmentY( JComponent.CENTER_ALIGNMENT) for the JComboBox, but this had no effect. I am using JDK1.1.6 and Swing 1.0.2 Any comments/suggestions are welcome. Thanks
Technical Details
Message-ID:
<6qdgji$g1j11@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,2f1067e24665c53c,start X-Google-Attributes: gid111d45,public From: "Matthew Krevs" <mattkrevs@flex.com.au> Subject: Adding a JComponent to a JToolBar Date: 1998/08/07 Message-ID: <6qdgji$g1j11@forums.borland.com> X-Deja-AN: 378679930 Organization: Another Netscape Collabra Server User X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Newsgroups: borland.public.jbuilder.java.swing