File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

line breaks in textfields?

 
steve tang
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I make a line break in a textfield?
I want to make something like a list that requires line breaks and I want to add it to the end of a string

moveString += "(" + (k1 + 1) + "," + (k2 + 1) + ") " +\r\n; doesn't work

Thanks
 
Timmy Marks
Ranch Hand
Posts: 226
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know if this will solve your problem, but the \n should be in quotes as well:

moveString += "(" + (k1 + 1) + "," + (k2 + 1) + ")\n";

You probably don't need the \r.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are we talking about AWT, Swing, SWT, HTML or something different here?

Anyway, in most, if not all, of those, textfields can't show more than one line - you'll need a textarea for that.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic