Click to See Complete Forum and Search --> : swingworker - progressbar


Michael
March 1st, 1999, 01:53 PM
i cannot get the swingworker/progress bar example from the sun swing trail to pass a value (a filename to process) to the LongTask class.


i can run the example with no problems unaltered. my problem is that i want to choose a filename to process, then send that filename to the class that will be threaded by SwingWorker. (in this example, LongTask)


i cannot determine how to do this. if i try to alter the constructors, i end up with run-time errors (method() V off the top of my head. i think that's it)


if i try to mess around with the constructors in SwingWorker to try to match my LongTask, i end up with a host of problems. and i don't think that is the proper way to do it. isn't SwingWorker supposed to be generic?


i've just started with swing, so many issues are still unclear. i'd appreciate it if someone would look at the examples and discuss the neccessary changes.


thanks,


michael




progress bar example at sun

Michael
March 1st, 1999, 01:53 PM
i cannot get the swingworker/progress bar example from the sun swing trail to pass a value (a filename to process) to the LongTask class.


i can run the example with no problems unaltered. my problem is that i want to choose a filename to process, then send that filename to the class that will be threaded by SwingWorker. (in this example, LongTask)


i cannot determine how to do this. if i try to alter the constructors, i end up with run-time errors (method() V off the top of my head. i think that's it)


if i try to mess around with the constructors in SwingWorker to try to match my LongTask, i end up with a host of problems. and i don't think that is the proper way to do it. isn't SwingWorker supposed to be generic?


i've just started with swing, so many issues are still unclear. i'd appreciate it if someone would look at the examples and discuss the neccessary changes.


thanks,


michael




progress bar example at sun