• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

ClassCastException when i get the DefaultTableCellRenderer from JTable

 
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 ]
 
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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!