Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiline JTable header

 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody implemented multiline table header ? I would like to know whether it's possible to implement this without adding additional characters like /n in column names.I'm trying to display "Origin Airport" , "Destination Airport" in 2 lines.
Thanks
[This message has been edited by Dilipkumar Kalyankar (edited April 05, 2001).]
 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use HTML in Swing components. less than sign 'P' greater than sign would work as a line separator.
[This message has been edited by Paul Smiley (edited April 05, 2001).]
 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,
In my FBN assignment I'm reading column names from db.db instead of hardcoding. So it will be difficult to include HTML or any other characters in column names without writing a special method to go through all the method names and insert less than sign 'P' greater than sign if the column name is very big.
Thanks
 
Sam Wong
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you must implement multi line headers, then I would suggest creating your own custom renderer for the headers. Within that, you can alter the value to include HTML tags. It's not that heavy at all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic