HorizontalLayout main = new HorizontalLayout();
main.setSpacing(true);
addComponent(main);
RichTextArea first = new RichTextArea("Defined height");
RichTextArea second = new RichTextArea("Full height");
RichTextArea third = new RichTextArea("Undefined height");
first.setValue(sb.toString());
second.setValue(sb.toString());
third.setValue(sb.toString());
first.setReadOnly(true);
second.setReadOnly(true);
third.setReadOnly(true);
first.setWidth("200px");
first.setHeight("400px");
second.setSizeFull();
third.setSizeUndefined();
VerticalLayout secondLayout = new VerticalLayout();
secondLayout.setWidth("200px");
secondLayout.setHeight("200px");
secondLayout.addComponent(second);