This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to flash a row in JTable? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to flash a row in JTable?" Watch "How to flash a row in JTable?" New topic
Author

How to flash a row in JTable?

Caly LeeAnn
Ranch Hand

Joined: Nov 22, 2005
Posts: 55
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

Joined: Jan 14, 2004
Posts: 1535
Caly LeeAnn
Ranch Hand

Joined: Nov 22, 2005
Posts: 55
Thanks alot, Craig! It's a really good example.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to flash a row in JTable?