I have a component at the center of a borderlayout and another component
at the south. when i relocate the latter to one of the other four
sides, the component resizes appropriately but
System.out.println(component) shows that the sizes shown are the
previous location's size.
When I move to the east from the south, and println, it shows the size
of east.
Any idea how o make the sizes updated?
ByteCoder - 21 May 2005 13:58 GMT
> I have a component at the center of a borderlayout and another
> component at the south. when i relocate the latter to one of the
[quoted text clipped - 6 lines]
>
> Any idea how o make the sizes updated?
Are you sure that the Component method: public Dimension getSize(); and
on the returned Dimension: double getHeight() and double getWidth()
don't work?

Signature
-------------
- ByteCoder - ...I see stupid people
-------------
Curiosity *Skilled* the cat
- - 22 May 2005 00:54 GMT
>>Any idea how o make the sizes updated?
>
> Are you sure that the Component method: public Dimension getSize(); and
> on the returned Dimension: double getHeight() and double getWidth()
> don't work?
That's okay.
After hours of trial and error I solved it simply by replacing
revalidate()
repaint()
with
validate()
ByteCoder - 22 May 2005 11:26 GMT
>>>Any idea how o make the sizes updated?
>>
[quoted text clipped - 11 lines]
>
> validate()
Oh yes, such fine human errors. I know all about it... *sigh* ;)

Signature
-------------
- ByteCoder - ...I see stupid people
-------------
Curiosity *Skilled* the cat
Christian Kaufhold - 21 May 2005 16:37 GMT
> I have a component at the center of a borderlayout and another component
> at the south. when i relocate the latter to one of the other four
[quoted text clipped - 4 lines]
> When I move to the east from the south, and println, it shows the size
> of east.
Please post a compilable example.
Christian