PDA

View Full Version : Best way to develop GUI (Not gridbag)


Peltito
07-25-2003, 07:03 PM
What's the best way to develop a GUI where you can stick what you want, where you want it? I find gridbag to be annoying to use and would like an easier way to set stuff where I want it.

Thanks.

inkedmn
07-25-2003, 07:07 PM
i've always used a combination of gridlayout and flowlayout.

Peltito
07-25-2003, 07:14 PM
Thanks. I'll look into it. Now, if only, someone would be kind enough to answer my question on the other thread.... :D

mace
11-21-2003, 01:39 PM
If you want to stick things exactly where you want then setLayout(null) and call setBounds(int x, int y, int width, int height) on all your components to position & size them.

This can become tedious though... but then again, so is working with Java's layouts.

Dru Lee Parsec
11-21-2003, 05:32 PM
I always use JPanels withing JPanels. I use BorderLayout, GridLayout, and Flow Layout. By placing panels within panels I've almost always been able to place my components where I wanted them. The added bonus is that if you resize the panel everything stays in the same relative position (that is NOT true of gridbag).