• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTextField Word Wrap??

 
Mike Smike
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

I have a number of JTextFields, and in each there is a bit of text information. The problem is is that the text just disappears off the side of the JTextField. How can I make the text wrap inside the Field, so that all the information fits inside the box. I tried /n in the string but that didn't work

Please help

Thanks buddies

Mike
 
Don Kiddick
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1st line of JTextField javadoc :
JTextField is a lightweight component that allows the editing of a single line of text

Use a JTextArea instead.
D.
 
Mike Smike
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah yes... thanks

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic