Hi Josip,

You can use the TableCellRenderer:

        table.setDefaultRenderer(Object.class, new
DefaultTableCellRenderer() {
            public IRendererComponent getTableCellRendererComponent(ULCTable
table, Object value, boolean isSelected,
                    boolean hasFocus, int row) {

                String str = ((String)value);
                if (str.startsWith("0") || str.startsWith("2")) {
                    this.setBackground(Color.blue);
                } else {
                    this.setBackground(Color.yellow);
                }
                return this;
            }
        });

Thanks and regards,

Janak

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of pr0v4
Sent: Monday, December 03, 2007 5:32 PM
To: [email protected]
Subject: [ULC-developer] ULCTable set color for a single row


I'm interessting in setting color for a single ULCTable row. Color should be
set for a single row by some condition, lets say by value from table which
we can get for example with tableModel.getValueAt(row,column) .  So if
anyone have any kind of suggestion I would be glad to see it!
Thanks in advance,
Josip!

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to