This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes customizng JTableHeader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "customizng JTableHeader " Watch "customizng JTableHeader " New topic
Author

customizng JTableHeader

subhadeep mandal
Greenhorn

Joined: Dec 15, 2004
Posts: 1
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

Joined: Jan 14, 2004
Posts: 1535
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.
 
jQuery in Action, 3rd edition
 
subject: customizng JTableHeader
 
It's not a secret anymore!