File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


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.
 
GeeCON Prague 2014
 
subject: How to flash a row in JTable?