How to change the background color of two alternating rows

i want to use only two colors for all table background which alternating rows must have different colors.How can i do it?

THANK YOU!

[145 byte] By [ilitheblacka] at [2007-11-27 10:59:49]
# 1

See

http://blogs.sun.com/winston/entry/setting_table_column_style

and this list of additional solutions

http://www.google.com/search?q=java+table+alternating+background+color

ChuckBinga at 2007-7-29 12:25:42 > top of Java-index,Desktop,Core GUI APIs...
# 2

http://www.sdnshare.com/view.jsp?id=503

macrules2a at 2007-7-29 12:25:42 > top of Java-index,Desktop,Core GUI APIs...
# 3

THX M8S I DID IT BY:

if(i>=tablonun_satir_sayisi)

{

((DefaultTableModel)veri_alanlari.data_grid.Table_Grid.getModel()).addRow(yeni_satir_icin_bos_dizi);

tablonun_satir_sayisi++;

}

only by one row =solution:)

ilitheblacka at 2007-7-29 12:25:42 > top of Java-index,Desktop,Core GUI APIs...