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
Post a Comment