i'm drawing a multiline text label using a FlowPage object that contains a TextFlow object. the code of my label class is:
class TransitionLabel extends FlowPage {
private TextFlow content;
public TransitionLabel()
{
setForegroundColor(ColorConstants.white);
setHorizontalAligment(PositionConstants.CENTER);
content = new TextFlow();
content.setOpaque(true);
content.setText("");
add(content);
}
public void setText(String content)
{
this.content.setText(content);
revalidate();
repaint();
}
public String getText()
{
return this.content.getText();
}
}
when the control is refreshed (after modification) it ends up like the SEND labels in the screenshot below .
am i doing something wrong? thanx for the help
PS the same screenshot can be found here
PPS
i edited the method getPreferredSize
that was irrelevant for the problem