Re: Design help
On Mar 31, 11:25 pm, Sanjay <sanjay.deb...@gmail.invalid.com> wrote:
I am no 'desing guru' but as a seasoned GUI developer,
the following sounds supsiciously like 'bad design'.
- Every class extend from a single abstract class, which defines look
and feel and other common properties like width, height etc.
The PLAF can be specified by the initial class
that invokes all other classes (or better the
main, before any single GUI class is instantiated)
all other dialogs, option panes, windows etc. will
default to that PLAF.
Further, the only classes that need to set a
(preferred) size are generally classes that
overide paint()/paintComponent(), or sometimes
JScrollPanes). Barring that, it should not be
necessary to do anything more than using
appropriate layouts, and calling pack(), which
will adjust the GUI to the appropriate size
for whatever PLAF (OS, screen settings, and
user preferences) are set.
If code (needs to, barring the caveats mentioned
above) specify a size for a GUI, that in itself
is a sign of potential problems.
Andrew T.