PROGRESS BAR

Can anyone help me how to show a progress bar while database is processing some data that needs to be displayed.

I am using struts and jsp.

Database processing is done when I click a link on the menu links of my screen.When this link is clicked a .do action is called from struts config and the action is called and database process starts.Once the process is done a jsp page is displayed.

How do I show the progress bar even before the action does a forward to the display page .

thanks

[518 byte] By [newbiestrutsa] at [2007-11-27 2:25:04]
# 1
Start a new thread with either the transaction or the progress bar updating in that thread. You have to know how long the transaction is going to take in order to figure out how and when to update the progress bar.
kmangolda at 2007-7-12 2:32:54 > top of Java-index,Java Essentials,Java Programming...
# 2

If you are showing the ProgressBar on application and you don't have the end limit then you can set the setIndeterminate(true) by this the cursor in the progress bar moves from left to right and when the task is completed you can hide it.

You can also set the upper limit by setMaximum(100) and then increment it by setValue(1)

Also you can set the text in progress bar by setStringPainted(true)

Also go through

http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html

jawadhashmia at 2007-7-12 2:32:54 > top of Java-index,Java Essentials,Java Programming...