Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassCastException when i get the DefaultTableCellRenderer from JTable

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I extended DefaultTableCellRenderer and set the JTable to use it.
The goal is to highlight some cells according to cretin logic.

The problem is when I get the cell Renderer table.getCellRenderer(i,j)
I get ClassCastException (the renderer I am getting is DefaultTableCellRenderer and not MyRenderer).

Please advice.
Sharon


[ July 13, 2007: Message edited by: Sharon whipple ]
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Testing indicates this should work okay. Let's make some inquiries.
 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
It was my foolish mistake; the renderer was assigned to the columns before providing the column data

The code of the first post working just fine
Sorry

Sharon
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!