Hi,

Is there a way to format a string into a paragraph format? The closest thing I got was entering the string into a JTextArea, but the only problem with this is that the words get split in between its characters making it almost seem like two different words....


- Thanks!

JTextArea has a bound property for line wrapping that controls whether or not it will wrap lines. By default, the line wrapping property is set to false.

Use following methods:
setLineWrap(boolean wrap)
setWrapStyleWord(boolean word)

There are also other text components depending upon the functionality you need. You can read more about them here: Using Text Components

How do I mark this as solved..? adatapost already solved it! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.