How to wrap the text in a jTextArea

Hello all,

I am currently developing a simple simulation program for our scientific research group. My boss asked me to employ the program with a GUI. However, I am new to Java Swing. It is nice to have you guys that may provide a helping hand to my problem.

My problem is with the jTextArea. Because my result to be displayed in jTextArea is lengthy and its length varies. The way I extract the result is to use a String to hold all of the results and directly pass it to the jTextArea. However, It is lope-sided and not quite user-friendly. Is there any function that I can use so that the text can be wrapped and that the user doesn't need to scroll left or right to view the results?

Thanks in advance(:

Message was edited by:

Shahn

Message was edited by:

Shahn

[819 byte] By [Shahna] at [2007-11-27 9:18:01]
# 1

> am currently developing a simple simulation program for our scientific

> research group. My boss asked me to employ the program with a GUI.

> However, I am new to Java Swing. It is nice to have you guys that may provide

> a helping hand to my problem.

something is amiss.

you're a developer (new to swing is irrelevant) and you don't know how to read the api docs?

there are only 6 set...() methods (apart from inherited) and what you want is 2 of them.

Michael_Dunna at 2007-7-12 22:08:55 > top of Java-index,Desktop,Core GUI APIs...