Re: Truncated Label Problem
- From: "Filip Larsen" <filip.larsen@xxxxxxxxx>
- Date: Thu, 30 Jun 2005 18:49:00 +0200
Andrew Thompson wrote
> > Here is the modified code:
>
> ..with a single line change..
> [...]
> setSize( getPreferredSize() );
Im not really sure why you would want that extra line in there. The demo
code was made to illustrate two ways one could deal with HTML-formatting
of long texts, either revalidating without pack (making the label grow
vertically inside the dialog), or revalidating with pack which makes the
dialog grow until label hits max width (and then grow label internally
if even longer).
Inserting setSize(getPreferredSize()) in the demo code has as far as I
can see no positive effect except making pack() being called every time
the button is clicked (and not only when you shift-click like before).
Regards,
--
Filip Larsen
.
- Follow-Ups:
- Re: Truncated Label Problem
- From: Andrew Thompson
- Re: Truncated Label Problem
- References:
- Truncated Label Problem
- From: MrFredBloggs
- Re: Truncated Label Problem
- From: Filip Larsen
- Re: Truncated Label Problem
- From: MrFredBloggs
- Re: Truncated Label Problem
- From: Andrew Thompson
- Truncated Label Problem
- Prev by Date: Re: Truncated Label Problem
- Next by Date: Re: Truncated Label Problem
- Previous by thread: Re: Truncated Label Problem
- Next by thread: Re: Truncated Label Problem
- Index(es):