• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Weird chars at end of line in JTextArea

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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);
p2.add(scrollPane);
//Wrapping the lines
// I read the lines from a file, set a text and use foll code to wrap the lines.
setLineWrap(true);
setWrapStyleWord(true);
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?

------------------
reply
    Bookmark Topic Watch Topic
  • New Topic