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 MultiLine Headers with Icons for a JTable 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 "MultiLine Headers with Icons for a JTable" Watch "MultiLine Headers with Icons for a JTable" New topic
Author

MultiLine Headers with Icons for a JTable

Neha D
Ranch Hand

Joined: Oct 12, 2004
Posts: 32
Hi,

I want multi line headers for a table with header icons. For multiline headers I am extending the renderer class to a JList & it implements the TableCellRenderer interface.

The problem is, it is showing me the multiline header for each column but when I click on any one of the headers it shows me the same icon twice for a single header. Is there any way out wherein I can just display the icon once on a mouse click.

I think the problem is b'coz the renderer is being called twice - once when the table is initialised for showing the multi line header & the other on a mouse click for displaying the icon.

Can anyone suggest me as to why is this happening...

Any help will be appreciated..

Thanx.

Regards,
-Neha.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MultiLine Headers with Icons for a JTable
 
Similar Threads
Problem in displaying JTable multiline headers with icons in jdk1.2
JTable setValueAt(Object o, int col, int row)
Setting renderers on JTable
Help with Jtree node handle icon .
on mouse over