0

HELLO !


first i shown all records in jtable ...

after i process(read from it and insert into DB) one record at a time..

while processing i need that particular row in yellow color...

if the row completed (inserted in DB) THEN the row become GREEN..

HOW TO DO...I TRIED SOME SOLUTION ...BUT IT WILL MAKE WHOLE TABLE AT A TIME...

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by javaAddict
0

After checking the API you can use these methods:

table.setSelectionBackground(Color.GREEN);
        table.setSelectionForeground(Color.RED);

        table.setRowSelectionInterval(1,1);

The setRowSelectionInterval selects the rows between the first and second argument. The above will select the row 1. And since you have used the setSelection.... methods, you see the pretty colors

Edited by javaAddict: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.