Ted Neward wrote: > > "Box" component? javax.swing.Box - a lightweight container whose purpose in life is to support easy use of the BoxLayout manager. It's one of the simplest solutions I've found to many layout problems. Nathan > > Ted Neward > Patterns/C++/Java/CORBA/EJB/COM-DCOM spoken here > http://www.javageeks.com/~tneward > "I don't even speak for myself; my wife won't let me." --Me > > -----Original Message----- > From: Nathan Meyers <[EMAIL PROTECTED]> > To: Kontorotsui <[EMAIL PROTECTED]> > Cc: Java-Linux List <[EMAIL PROTECTED]> > Date: Thursday, September 09, 1999 11:37 AM > Subject: Re: Sometimes easy things are hard/impossible in Java > > >Kontorotsui wrote: > >> > >> After extensive experience with Java GUI, mostly by using Swing, I wonder > why > >> there are hard tasks which can be accomplished very easily and easy ones > which > >> look almost impossible. > >> > >> Here are two examples. > >> > >> I have a grid with 3 buttons in the first row and 2 buttons in the third, > I > >> wanted to place the third row buttons centered, like this: > >> > >> XX XX XX > >> > >> XX XX XX > >> > >> XXX XXX > >> > >> but no layout manager allows to do it in a single panel, I had to do > several > >> panels. > > > >I've found Swing's Box component great for this sort of job. Yes, you > >have to create multiple boxes (this example would require 3 horizontal > >boxes inside a vertical box), but they're easy to use, low-overhead, and > >the "glue" and "strut" components make it dead-easy to construct this > >sort of layout. > > > >Nathan > > > > > >---------------------------------------------------------------------- > >To UNSUBSCRIBE, email to [EMAIL PROTECTED] > >with a subject of "unsubscribe". Trouble? Contact > [EMAIL PROTECTED] ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]