java - How to add text to new line -


i want add text new line.

my code:

textfield text = new textfield();  textarea area = new area();  string txt = text.getvalue().tostring();  area.setvalue("\n" + txt); 

when click in button see value textfield. want new text in new line in textarea. please help.

you have append new value existing 1 , set that. along lines of:

area.setvalue(area.getvalue() + "\n" + txt); 

the vaadin textarea has no direct way append. rules in java, when use + stringsapply. consider using stringbuffer, if alot.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -