In VB there was a parameter you could set for a Text Area so that when you were typing in it once you reached the end if would wrap to the next line. Exactly like what happens when you are typing in a post on this board. How can you do the same with Java's text box?
Textbox only allows one line. A horizontal scrollbar is provided if needed. TextArea you can specify of you want any scroolbars at all. You may want to check the API for the specifics.
Bosun
Bosun (SCJP, SCWCD).
So much trouble in the world -- Bob Marley
Hi Tom, The only case where a TextArea will wrap is when you specify that you don't want a horizontal scrollbar: SCROLLBARS_NONE, or SCROLLBARS_VERTICAL_ONLY I am not sure that it will exactly word wrap as I haven't ever tried it... Manfred.
you can use one of the overloaded version of constructors to set width & height of TextArea, when u exceed the width line will automatically be wrapped.