Results 1 to 3 of 3
  1. #1
    newbiejava is offline Senior Member
    Join Date
    Jan 2010
    Posts
    138
    Rep Power
    0

    Default How to change the forecolor of entire row base on value of a column?

    on JTable

    How to change the forecolor of entire row base on value of a column?

    ie.

    if the value of the 3rd column is 1 then the forecolor is black
    if the value of the 3rd column is 2 then the forecolor is blue
    if the value of the 3rd column is 3 then the forecolor is green
    if the value of the 3rd column is 4 then the forecolor is red

    please help

    thanks & regards

  2. #2
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    how would you change the forecolour of JTable anyway?

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by al_Marshy_1981 View Post
    how would you change the forecolour of JTable anyway?
    Yeah, if you know that, build the logic on top of that HOW TO...

Similar Threads

  1. insert row and column and delete row and column
    By daredavil82 in forum New To Java
    Replies: 13
    Last Post: 09-22-2011, 07:10 PM
  2. Replies: 1
    Last Post: 07-06-2010, 05:50 PM
  3. Can you set the font for an entire panel?
    By pahiker in forum AWT / Swing
    Replies: 8
    Last Post: 07-05-2010, 11:45 AM
  4. Replies: 0
    Last Post: 07-24-2009, 09:58 AM
  5. Download the entire web site?
    By makpandian in forum New To Java
    Replies: 0
    Last Post: 03-14-2009, 11:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •