Skip to main content

Revalidate List dimensions as items are added.

3 replies [Last post]
lyschoening
Offline
Joined: 2008-07-13

I have an empty list inside a Container that I do not seem to get it to resize when items are added. Is there any kind of invalidate() function as for Containers?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lyschoening
Offline
Joined: 2008-07-13

Form.revalidate() works, thanks.

If it is not particularly efficient, is there an elegant way to laying out a Form with a TabbedPane containing a List out to full screen size? Please tell if posting my code would make things easier. It's currently on a different machine, which is why I have not posted it earlier.

Shai Almog

Hi,
you can just place the list or the tab pane in a CENTER area of a
border layout. The CENTER is a special case which stretches out the
component to the full available area regardless of preferred size.

Thanks,
Shai.

> Form.revalidate() works, thanks.
>
> If it is not particularly efficient, is there an elegant way to
> laying out a Form with a TabbedPane containing a List out to full
> screen size? Please tell if posting my code would make things
> easier. It's currently on a different machine, which is why I have
> not posted it earlier.
> [Message sent by forum member 'lyschoening' (lyschoening)]
>
> http://forums.java.net/jive/thread.jspa?messageID=287243
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

Shai Almog

Hi,
there is a Form.revalidate() method that does that. I would not
recommend on invoking it for every addition.

Thanks,
Shai.

> I have an empty list inside a Container that I do not seem to get
> it to resize when items are added. Is there any kind of invalidate
> () function as for Containers?
> [Message sent by forum member 'lyschoening' (lyschoening)]
>
> http://forums.java.net/jive/thread.jspa?messageID=287125
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]