Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Setting size of Label in FlowLayout

Hi, I have a bunch of lables in a flowlayout.

I want to have these labels start with nothing in them but have a white background. So i dont want them resizing to nothing cause theres no text in them. setSize doesnt work. They are in a flowlayout.

I haerd about setPrefferedSize but dont know how or if it works.

any ideas? Thx
[354 byte] By [p1kn1c] at [2007-11-11 8:00:04]
# 1 Re: Setting size of Label in FlowLayout
I'd say setBounds() but I'm not sure how that would work with flow layout.

otherwise you would have to set all these
setPreferredSize()
setMinimumSize()
setMaximumSize()
the layout decides which it uses so set them all to be safe.
Joe Beam at 2007-11-11 22:36:39 >