• Post Reply Bookmark Topic Watch Topic
  • New Topic

SWT TextArea

 
dushantha Rathnayake
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to SWT. I have a TextArea on my shell. I want to use this TextArea to show some informations line by line. So I do settext operation. But the problem is I want to set text line by line. so I set "\n" for every line. but its not work. I using a thread to insert text continually.


 
dushantha Rathnayake
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I found an answer I insert "\r\n" now it is ok.

Thank you.
 
Darryl Burke
Bartender
Posts: 5155
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may be better to use System.getProperty("line.separator") instead of \r\n which is Windows-specific.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!