aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Abstract Table Model row colours Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Abstract Table Model row colours" Watch "Abstract Table Model row colours" New topic
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: 2216
    
    7
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: 10523
    
    9

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


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
 
subject: Abstract Table Model row colours