• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable - Align Column Headers on Left

 
Nura Horne
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi how do I make the column headers for each column in my JTable align on the left? By default they are centred.
Thanks, A
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check DefaultTableModel, TableColumn and setHeaderRenderer(). You probably need to create a renderer for the columns and use it.
[This message has been edited by Paul Stevens (edited July 26, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!