This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Weird chars at end of line in JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Weird chars at end of line in JTextArea" Watch "Weird chars at end of line in JTextArea" New topic

Weird chars at end of line in JTextArea

Shital Shisode

Joined: Nov 15, 2001
Posts: 7
I am getting these weird characters at the end of the line in JTextArea when I use setText.
I am doing the foll:
//Creation of JTextArea
JPanel p2 = new JPanel(); // for JTextArea and video
displayText = new JTextArea(15,30);
JScrollPane scrollPane = new JScrollPane(displayText);
//Wrapping the lines
// I read the lines from a file, set a text and use foll code to wrap the lines.
The text from the file is displayed correctly. But the last line of the para is filled by weird characters ( to complete the line I guess).
Any idea of this strange behaviour?

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Weird chars at end of line in JTextArea
It's not a secret anymore!