how to change the background image of Jtable Cell


G

get_moumita

hi,
I want to change the background image of a cell in a JTable,when i
click on it...
plz help...
 
Ad

Advertisements

R

Rhino

hi,
I want to change the background image of a cell in a JTable,when i
click on it...
plz help...
It sounds like you will need to write a custom cell renderer or editor to
accomplish that. This article will give you the basics of how to write cell
renderers and editors:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html.

This article is more advanced and gives considerably more information on how
cell renderers and editors work:
http://www-128.ibm.com/developerworks/library/j-jtable/. It doesn't actually
talk about how you can change background images within a renderer or editor
but you will probably be able to reason out how to do that from this
article.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top