Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

customizng JTableHeader

 
subhadeep mandal
Greenhorn
Posts: 1
  • 0
  • 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
Posts: 1535
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic