set the color of a cell in a JTable

Discussion in 'Programming' started by ellias2007, Jul 29, 2011.

  1. #1
    Hi all,
    i need to set the color of a row (or simply a cell) in a JTable to a specific color,
    i read these pages :

    http://stackoverflow.com/questions/...y-1st-row-in-my-jtable-to-yellowor-any-colour
    http://www.roseindia.net/java/example/java/swing/SadingRows.shtml
    http://stackoverflow.com/questions/3875607/change-the-background-color-of-a-row-in-a-jtable
    http://www.codeguru.com/forum/archive/index.php/t-34478.html
    http://www.thatsjava.com/java-swing/16549/

    and many many links like these ... all are HARD and too complicated ..
    What i need is tooooo simple : simply pick some Row and then set its color to red for example ...
    CAN you help me Please ....:(

    i need the simplest possible code

    Many thanks
     
    ellias2007, Jul 29, 2011 IP