dcsimg

How can I make a TextArea Word-Wrap?

Jorge Jordão

Simply disable the horizontal scrollbar, and the text will wrap.

In other words, use only vertical scrollbars


    TextArea ta = new TextArea("", 10, 30, TextArea.SCROLLBARS_VERTICAL_ONLY);
or no scrollbars at all

    TextArea ta = new TextArea("", 10, 30, TextArea.SCROLLBARS_NONE);