🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #13319

Re: Adding a JComponent to a JToolBar

#13319
From: mnemonic
Date: Sat, 08 Aug 1998 00:00
15 lines
1108 bytes
Matthew

You should set the layout of your JToolBar to BorderLayout.
Then add your JComboBox object to the JToolBar contatiner.
Then set the constrains property of the JComboBox object to CENTER.

Your JComboBox will now be displayed in the center of the JToolBar.

May I give you the advise to forget about XYLayout layouts and to use nested
BorderLayout and GridLayout instead? There is a good tutorial on this within
JBuilder inside the Designing GUI or something chapter.

Hope it helps,

Yann Le Locat
Technical Details
Message-ID: <35CC8398.D215262D@mmc.mmu.ac.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6qdgji$g1j11@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,2f1067e24665c53c
X-Google-Attributes: gid111d45,public
From: mnemonic <mnemonic@mmc.mmu.ac.uk>
Subject: Re: Adding a JComponent to a JToolBar
Date: 1998/08/08
Message-ID: <35CC8398.D215262D@mmc.mmu.ac.uk>
X-Deja-AN: 379187849
Content-Transfer-Encoding: 7bit
References: <6qdgji$g1j11@forums.borland.com>
To: Matthew Krevs <mattkrevs@flex.com.au>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing