Hi Nigel,

Most Swing pros do it by hand; the tools have never been very good for handling layout managers. The trick is to understand the concept of nested layout managers and things get much better. There is one tool that has gotten pretty decent reviews: project Matisse. See:

http://form.netbeans.org/

http://www.netbeans.org/kb/articles/matisse.html

Of course, you can always use absolute positioning with a null layout manager, but you'll quickly see problems at different resolutions or on different platforms (where metrics often differ.) BTW, that's no different in any graphical system, it's just often ignored until it's in your face. "those horrid layout managers" do the work for you so you don't have to compensate programmatically with custom code.

One example I ran into, not Swing but related, was with JasperReports, which is a great no-cost alternative to Crystal Reports. I developed the reports on a Windows platform and they looked fine. When run under WebSphere on the AS/400, there were what looked like missing fields and other anomolies. Turns out that the same font family (in a headless PASE environment) has different (larger) metrics than on WIndows. Not fun.


Joe Sam

Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400

----- Original Message ----- From: <NGay@xxxxxxxxxxxxx>
To: "Java Programming on and around the iSeries / AS400" <java400-l@xxxxxxxxxxxx>
Sent: Friday, November 02, 2007 11:19 AM
Subject: Re: How to start with JAVA on I-series


Brian,

(snip)


Did you try using the Visual Editor Eclipse plugin for Swing? I tried this
at first since I was used to Delphi which has a really nice visual form
designer and I wanted something that worked the same. But its absolutely
horrid, I found if I breathed on the code it autogenerated it would then
refuse to parse it and I couldn't load it back into the visual editor. Now
I've given up on this and I just setup Swing components with hand written
code, and got the hang of those horrid layout managers, I quite like Swing.
(Although I've only ever used Swing for one tiny project at work, I mostly
use Swing for my home projects, so I can't say I've built a sizeable
business app with it).

Regards,

Nigel Gay,
Computer Patent Annuities.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.