posted 22 years ago
In a JTextArea, all you have to do is call setLineWrap( false ) on it and stick it in a JScrollPane...
For a JTextPane, you have to override two methods... getScrollableTracksViewportWidth() and
setSize()...
Here's some code that shows how to turn off line wrap in both components...
-Nate
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.