How use a progress bar into applet?

D

Derek

Hello:

I have an applet with a progress bar, but it isn´t update during the
runnning. It only update when the program finish.

How use a progress bar into applet?.

Thanks.
 
M

me

You are doing your processing inside the AWT event
dispatch thread. Calling repaint() on your
progressbar, puts an event in queue that will
be handled by the same thread. It cant pick up
the event and dispatch before you stop using
the thread yourself.

The answer is to do you processing in another
thread that you start yourself. The AWT event
dispatch thread will then be free to handle paint
events on gui components such as your progressbar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top