aps109
aps109

Reputation: 167

how to build a textfield with caption and text area in the same line Vaadin

i was implementing a text field to get some user data (new to vaadin)

when i initialize the textfield using

 new TextField("caption"); 

i am using reindeer theme how can i get the text field as this :

caption: textarea //same line

instead of

caption: //different lines
textarea

should i override the default css and how to do it?????
or is there any method availble for this??????

Upvotes: 0

Views: 1388

Answers (1)

nexus
nexus

Reputation: 2937

You have to use the FormLayout.

FormLayout fl = new FormLayout();
TextField tf = new TextField("caption"); 
fl.addComponent(tf);

More information in the Vaadin Book here.

Upvotes: 3

Related Questions