Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

customizng JTableHeader

 
subhadeep mandal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to customize a partcular columnheader of a JTable such that the columnheader will be displayed as a panel which contains more than one JLabels in a Border/GridLayout maneger
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make a class that implements TableCellRenderer and equip it to return your JPanel as the renderer component. Get the TableColumn from the TableColumnModel of the table and then set your renderer on it with setHeaderRenderer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic