SetActualSize () with Label Component Confusion
If you are extending the UIComponent and adding a Label component to your custom component it seems you need to use setActualSize () for your label to appear. The problem is that I don't know what size the label will have as it depends on the length of the text and the size of the font. Sometimes it works:
label.setActualSize(label.getExplicitOrMeasuredWidth(),
label.getExplicitOrMeasuredHeight())
but not always. I'm not sure why this is.
What's the best way to set the label to its actual size?
thank
0
a source to share