H
Hendrik Maryns
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have this long preprocessing task in a Swing app I’d like to be done
in the background, so I am working through
http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html.
As I understand it, the method doInBackground in SwingWorker is not
supposed to do anything with the GUI. However, what I do in there may
throw exceptions, which I’d like to handle with error messages to the user.
Is it OK to have stuff like
} catch (final UnsatisfiedLinkError exc) {
JOptionPane.showMessageDialog(UIBuilder.this.getFrame(),
"The Mona library has the wrong format. You may be on an unsupported
platform. "
+ "Try compiling the library yourself or contact a developer.",
"Mona library problem", JOptionPane.ERROR_MESSAGE);
exc.printStackTrace();
}
in the method, or will this cause problems?
If not, then how am I supposed to give the user some feedback about what
went wrong?
TIA, H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFILCxle+7xMGD3itQRAmQ+AJ0RlU38LQqO67lm/Hdueuiiap2DAQCeP/xO
lIVQ15nUVAnrdVokDihH5yo=
=wVF7
-----END PGP SIGNATURE-----
Hash: SHA1
Hi,
I have this long preprocessing task in a Swing app I’d like to be done
in the background, so I am working through
http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html.
As I understand it, the method doInBackground in SwingWorker is not
supposed to do anything with the GUI. However, what I do in there may
throw exceptions, which I’d like to handle with error messages to the user.
Is it OK to have stuff like
} catch (final UnsatisfiedLinkError exc) {
JOptionPane.showMessageDialog(UIBuilder.this.getFrame(),
"The Mona library has the wrong format. You may be on an unsupported
platform. "
+ "Try compiling the library yourself or contact a developer.",
"Mona library problem", JOptionPane.ERROR_MESSAGE);
exc.printStackTrace();
}
in the method, or will this cause problems?
If not, then how am I supposed to give the user some feedback about what
went wrong?
TIA, H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFILCxle+7xMGD3itQRAmQ+AJ0RlU38LQqO67lm/Hdueuiiap2DAQCeP/xO
lIVQ15nUVAnrdVokDihH5yo=
=wVF7
-----END PGP SIGNATURE-----