Dear Mr. Thompson,
It is not that i'm ignoring your advice. I pretty much appreciate
that. i know that the porblem here is again setLayout(null). But i'm a
bit helpless here. It could be a design flaw, but i'm left here with
five classes which are represented by the five classes in my original
post. I'm having to develop this UI, but situation here is that i
cannot go and change the design. Also the added components needs to
come in the specified places, not in a region as defined by the
BorderLayout or at an available place as decided by the FlowLoayout.
Using GridLayout or GridBagLayout turns out to be too complex. i'm
forced to use null layout. i do not have a choice as far as the design
of this UI is considered. So all i can do is to find out how i can fit
things into this may-be-bad design. Again if you are able to give some
suggestion on how this can be implemented in this given
scenario,rather than thinking that you are wasting your time, i'd
appreciate it.
Thanks again
Chanchal
...
>It is not that i'm ignoring your advice.
Have you done the layout tutorial yet?
>..I pretty much appreciate
>that. i know that the porblem here is again setLayout(null). But i'm a
>bit helpless here. It could be a design flaw, but i'm left here with
>five classes which are represented by the five classes in my original
>post. I'm having to develop this UI, but situation here is that i
>cannot go and change the design.
Yes you can. If you had done the layout tutorial,
that much should be obvious.
>..Also the added components needs to
>come in the specified places, ..
Which is what layouts do. The only reason my versions
of the layouts differed from yours, is that I did not
take much care to place them 'pixel by pixel' exactly
as you had them, that was left as an exercise for you.
'Batteries not included'.
And while we are on 'specified places', I will point out
that null layout/exact positioning GUI's might well fail
under a different PLAF or Java version, on screens of
different resolution or size, on different platforms, with
a different default font size, or.. any number of other
reasons.
Exact pixel positioning just does not make any sense
in a language defined to be X-plat - unless you cover
all of the things mentioned above. Once your GUI has
tacked every aspect of that down, you might as well
have put that logic into a layout manager.
Using the inbuilt layouts might give you a good start
at understanding how to make a custom layout
manager.
>..not in a region as defined by the
>BorderLayout or at an available place as decided by the FlowLoayout.
Adjust the borders or insets. Your comment about
how the FlowLayout of an earlier example did not meet
your exact requirements is a good indication that
you had not checked the JavaDocs. They are invaluable
for this stuff, and programmers need to read a lot of
documentation if they expect to be successful.
Asking people on usenet newsgroups to fix the basic
problems with an already very broken null layout, is
no substitute.
>Using GridLayout or GridBagLayout turns out to be too complex. i'm
>forced to use null layout.
No, you just need to put the effort in to learning how to
use them. If you really cannot figure how best to layout
any particular GUI - try describing it in either a text diagram
(good for usenet, but not the sort of precise definitions
that you seem to want), or an actual (crude or otherwise)
drawing - which cannot be posted to this usenet group,
but can be shown to others via URL.
>..i do not have a choice as far as the design
>of this UI is considered. So all i can do is to find out how i can fit
>things into this may-be-bad design. Again if you are able to give some
>suggestion on how this can be implemented in this given
>scenario,rather than thinking that you are wasting your time, i'd
>appreciate it.
Layouts.
By the way. You seem to be putting more time and effort
into your excuses, than you are into doing the layout tutorial,
or otherwise learning how to use them. That is not time
well spent.

Signature
Andrew Thompson
http://www.athompson.info/andrew/