Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to flash a row in JTable?

 
Caly LeeAnn
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to flash a particular row in JTable. And I don't want to use the following method because a row gets flashed if it is selected.

table.addRowSelectionInterval(row, row);
table.setSelectionBackground(Color.RED);
Thread.sleep(500);
table.removeRowSelectionInterval(row, row);
table.setSelectionBackground(Color.WHITE);
Thread.sleep(500);

I try to use TableCellRenderer but get quite confused.

Any advice would be appreciated.

Thanks.

Caly
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Caly LeeAnn
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot, Craig! It's a really good example.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic