In Vaadin 7.0, you can use ContentMode.PREFORMATTED, for example:
String resultText = "First line\rSecond line\nThird line"; Label dateLabel = new Label( resultText, ContentMode.PREFORMATTED );
and if you want the text to look sexy, you can use some themes, for example:
dateLabel.setStyleName( Runo.LABEL_SMALL );
It should work and be elegant.
source share