Thursday, October 07, 2004

login GUI sample source code

Referring to my previous post, here's the source code that I made..
I decided to separate the implementation into:
- a Screen class which will manage the event handling & business delegation
- a Builder class which will be responsible for laying out the components
- constant classes, such as Fonts, Colors & Dimensions, for consistency, reusability & efficiency throughout any number of GUIs we may have
I used GridBagLayout extensively in this example, it's still one of my favourite layout because it can lay the components in almost any layout

Now, after exploring more and more, I'm considering JGoodies FormLayout & its contributor, FormLayout Maker for any well structured forms. And, ExplicitLayout for other layout which may never be possible to create using any layout manager ever existed.

Anyway, as the sharing goes..
I'm interested if anyone can suggest an idea on how the responsibility for the classes involved in a GUI be divided..
You can find my approach in the attached file, let me know yours.. :D

Further Reading:
Swing Second Edition
Java Swing Second Edition

1 comment:

  1. Hello Eric,
    can please repost your login application. thanx a lot.