| Author |
Abstract Table Model row colours
|
Mike Brooks
Greenhorn
Joined: Oct 07, 2007
Posts: 14
|
|
Hey,
Is there anyway to change a JTable row colour using the abstract table model not the default table modle cant find this information anywhere.
Thanks and regards
|
 |
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1791
|
|
|
You ask lots of questions but never bother to read the answers. At least you never bother to reply stating whether the suggestions work or not. So I won't bother to answer the question so you don't have to worry about replying.
|
 |
Zhui Shen Ge
Greenhorn
Joined: Nov 22, 2009
Posts: 5
|
|
|
Using a custom cell renderer?
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8439
|
|
Zhui Shen Ge is correct.
I take it you are aware of MVC.
The model holds the data. It is not aware of any visual aspects of displaying that data. In fact the model even does not care how it's data is rendered. Check out the standard tutorial (The API docs have a link to it) on how to use JTables. Scroll down to the section which talks about renderers and editors.
In case you are wondering about Rob's reply, read http://faq.javaranch.com/java/SayThanks
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
 |
|
|
subject: Abstract Table Model row colours
|
|
|