?
Solved

Progress Monitor/Bar for recording the length of a method

Posted on 2003-03-17
2
Medium Priority
?
202 Views
Last Modified: 2012-05-04
I want to add a progress monitor/bar in order to show the progress of a method. The method connects to a database and queries it, then sends the results to a txt file. I want a progress bar showing how far it is in processing its job.

How would I add progress monitor to such a method? I'm really confused.
0
Comment
Question by:enchance
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Expert Comment

by:glottis
ID: 8157445
create a class abc and extend JFrame and a JProgressBar to it.
create another class xyz and add a method init to it.

after showing the class abc create a new instance of xyz andd pass JProgressBar to it. then call this class init method.

in you init method you can connect to the database, after connecting increment the progress (see JProgressBar.setValue()) then query database and again increment as so on.
0
 

Accepted Solution

by:
java_gurl earned 200 total points
ID: 8157839
thanks glottis!
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question