myLabel.setText("Second Test")
if the label text was on initialize set to "first" then
the UI will display only "Se...".
Does somebody know the solution ???
Sincerely
Re-validate the container containing the label. It will force a
re-layout, which will resize the label.
Ethan
--
Ethan Henry e...@klg.com
Java Evangelist, KL Group http://www.klg.com
"Software Development Productivity"
It sounds like the label is too small. You have to resize the label so
all the text fits on it :) This isn't done dynamically; you've got to set
it at compile time.
--
---------------------------------------------------
Paul Medynski coo...@nortel.ca
Nortel - Skypark Location Ottawa, ON, Canada
Phone: (613) 763-5130
Java GUI Developer -- Integrated Network Management
Do you use a layout?
Programmer wrote in message <71shiu$kog$2...@ubnnews.unisource.ch>...
>Have you ever seen that? I’m trying to change the text like follow :
>
>myLabel.setText("Second Test")
>
>if the label text was on initialize set to "first" then
>the UI will display only "Se...".
>
>Does somebody know the solution ???
>
>Sincerely
>
>
>
setSize(getPreferredSize());
super.paint(g);
The reason is that the peer class doesn't update the size of the component
before updating the size of the text. From my experiences, a simple call to
validate(), invalidate(), or repaint() doesn't work.
Rick Carragher