aspose file tools*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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?