Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding spinning tool in jDialog in java

Tags:

java

swing

I am working in a desktop application. In my application i am performing login operation where user enters his id and password. Login page is created in java swings using jDialog. When user enters his credentials, it takes few minutes to validate user. i want to add snipping tool with message "Please wait" which will be display, when user click on "next" button.

I didn't get any swing control which can be used as snipping tool. While searching i got some idea that ajax loader.jpg can be used as a snipping tool but not getting how can i use it in my jDialog.

Please suggest me some way to add an snipping tool.

like image 398
Toman Avatar asked Sep 25 '10 13:09

Toman


2 Answers

There is spinning tool available in ajax that can be directly used by putting a lable in jPanel/jDialog and importing it as an icon image.

Here is link where you can get ajax spinning tools

http://www.andrewdavidson.com/articles/spinning-wait-icons/

Thanks for your valuable suggestions and response.

like image 101
Toman Avatar answered Nov 02 '22 02:11

Toman


You can use a JProgressBar doing a bucle and changing the progress value. Also take note that SwingX project offers a login dialog that does it for you.

like image 42
lujop Avatar answered Nov 02 '22 03:11

lujop