Is this your first time here? SwingWiki is a Java Swing Developer community site with an big archive of Swing-related usenet groups and mailing lists, but also tips, tricks and articles and book reviews written by your colleagues from around the world. If you came here through a search engine and did not find what you were looking for, make sure to check the wiki table of contents.

Swingworker-Question.

From:Christian-Josef Schrattenthaler [christian-josef@masked-domain]
Sent on:Sun, 04 May 2008 22:40:05 +0200
Hi!

I have a class, that displays a JDialog. After a click on the
ok-button, a Report over JasperReports should be created and shown on
the screen.

Now I want to make an information window for the user, because the
generation of a report could take some minutes (big database).

I tried the SwingWorker, and an intermediated JProgressBar. Also the
ok-button of the main dialog will be disabled and enabled.

This system works fine!

But now I have the problem, that I also have to make a cancel-button
in the information window. I tried some examples I found over Google,
but I dind't find a working solution for my application.

How would the professional Java programmers solve this, if a ok-button
from a JDialog starts a method to create a JasperReports report, and
while creating the report the user should get an information dialog
with a JProgressBar and a cancel-button and the ok-button must be
disabled/enabled?

Greetings,
Christian.
Found what you were looking for? If not - continue at Wiki Index

 
Recent changes | RSS changes | Table of contents | News Archive | Terms And Conditions | Register | The Quest For Software++| Ruby Resources
FitNesse Resources