File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Abstract Table Model row colours

 
Mike Brooks
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2473
8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a custom cell renderer?
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic