Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JTable wait indicator

I have java applet with JTable. Due to lots of data and poor network bandwidth it takes lots of time to perform any operation like load the table or change it. I'm thinking about adding sort of activity indicator to let user know that his request is processing. Before i use JProgressBar, I'd like to know whether there are other options like ajax activity flower.

like image 728
Misha Avatar asked Dec 27 '22 15:12

Misha


1 Answers

The easiest way would be setting a (not animated) WAIT_CURSOR

// Setting cursor for any Component:
  component.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
  doProcessing();
  component.setCursor(Cursor.getDefaultCursor());

see http://www.catalysoft.com/articles/busyCursor.html

For an animated cursor see:

http://book.javanb.com/swing-hacks/swinghacks-chp-12-sect-2.html

like image 190
stacker Avatar answered Jan 07 '23 23:01

stacker