Re: changing font and colours for a specific rows based on specific criteria



Anyone can pls give some examples. I am also facing same problem.

chiuwingsze@xxxxxxxxx wrote:
Hi,
I am trying to change the colour of a row depending on a value of one
cell of that row, so if i see a cell that matches the criteria, i would
want that entire row coloured red.

i wrote my own TableCellRanderer for that to check for matching
criteria:

....

if(value.equals("NEW") ){
foreground = Color.RED;

}
renderer.setForeground(foreground);
return renderer;

}


but all this does is to change that specific cell to red and not the
entire row.

Any help would be appreciated.

Regards
Venus

.



Relevant Pages

  • Re: changing font and colours for a specific rows based on specific criteria
    ... chandu wrote: ... I am trying to change the colour of a row depending on a value of one ... cell of that row, so if i see a cell that matches the criteria, i would ...
    (comp.lang.java.gui)
  • changing font and colours for a specific rows based on specific criteria
    ... I am trying to change the colour of a row depending on a value of one ... cell of that row, so if i see a cell that matches the criteria, i would ... return renderer; ...
    (comp.lang.java.gui)
  • RE: Lookup Data in two seperate Spreadsheets
    ... 'Cell Formula using the OFFSET worksheet formula with multiple criteria to ... Just as VLOOKUP will give you the FIRST value it finds that meets it's ... 'Returns a reference to a range that is a specified number of rows and columns ...
    (microsoft.public.excel.worksheet.functions)
  • RE: Wild Card Vlookups
    ... 'Cell Formula using the OFFSET worksheet formula with multiple criteria to ... 'Returns a reference to a range that is a specified number of rows and columns ...
    (microsoft.public.excel.misc)
  • Re: Sorting into different worksheets from a unique value
    ... rewrote the code and posted it at the bottom. ... don't get a headache from watching the screens bounce back and forth. ... criteria. ... this IF function determines if there is something in cell A2. ...
    (microsoft.public.excel.worksheet.functions)