This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "customizng JTableHeader " Watch "customizng JTableHeader " New topic

customizng JTableHeader

subhadeep mandal

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.
wood burning stoves
subject: customizng JTableHeader
Similar Threads
JTable and XP column issue
Jtable fire event question
problem in displaying an array conditionally using display tag
how to add Columns dynamically to JTable
message bundle with dynamic keys