Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

wordwrap_JTable

 
Lars Val
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know if it is possible to get JTable to wordwrap and display multiple lines of text within a singel cell?
sinc.
/lars
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using the standard cell renderer it extends JLabel which understands html. You can wrap your text between <html> and </html> tags and word wrap will be taken care of for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic