> Now would someone please tell me the philosophy of having so many layouts?
- Resizablilty
- Doesn't assume you have IDEs (not everyone can run power/ram hungry IDEs ... people like me still depend a lot on NotePads and EditPluses)
- Ease of readiblity.
is
content.add(toolbar);
toolbar.setBounds(0,0,10,100);
easier?
or
content.add(toolbar, BorderLayout);
easier?
- Doesn't assume you use the same IDE.
Forms you create in JBuilder can't (be easily) viewed in Netbeans right.
Well, when I started, the forms/codes i took over that were written in JBuilder can't even be viewed in JBuilder. It was a tough time then....
> 2- Why we do not stick with SpringLayout for example and do
> everything with it? Can I stick with it without need of others?
As long as you feel it fits your needs and is easily maintainable, why not?
> 3- NetBeans uses a GroupLayout in its Form Designer.
> Is this better than SpringLayout?
There's no such thing as a better layout. Each has their own use and place.
Take for example, GridbagLayout. its the most versatile layout available on jdk. Most complex java ui use that. (at least before JGoodies)
The only problem with it is its verboseness and difficulty to code and read.
Its a layout that more suited for IDE builder.
Note that Springlayout is available only from 1.4 onwards, so using in systems such as 1.3 will require some effort.
> 4- Can I safely stick with NetBeans form designer and let it do coding
> for form designs? Or I should bother myself about details?
Sure, why not. As long as you don't mind being stuck to NetBeans, its not a bad idea at all.
OTOH IIRC do note that group-layout library is LGPL licenced. If your company has problems with that, then beware.
If that's the case, I'd recommend using
JGoodies FormLayout, which is easily readable and maintainable as well as BSD licenced.
For the form builder, I highly recommend
JFormdesigner. IMHO its the BEST java form designer currently. It supports JGoodies FormLayout and all the jdk layouts except for SpringLayout. Though its not free.
Not that, I'm not related to both JGoodies nor JFormdesigner. I'm just a very very happy customer.
In summary, it all boils down to personal preference.
[ December 19, 2006: Message edited by: Terry Ong ]