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...

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.