[Jarspy-commits] CVS: JarSpy/src/com/ociweb/jarspy/gui/actions OpenArchiveAction.java,1.4,1.5
Status: Beta
Brought to you by:
brown_j
|
From: Jeff B. <br...@us...> - 2002-09-14 00:31:22
|
Update of /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/gui/actions
In directory usw-pr-cvs1:/tmp/cvs-serv31565
Modified Files:
OpenArchiveAction.java
Log Message:
Index: OpenArchiveAction.java
===================================================================
RCS file: /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/gui/actions/OpenArchiveAction.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** OpenArchiveAction.java 19 Jul 2002 00:46:43 -0000 1.4
--- OpenArchiveAction.java 14 Sep 2002 00:31:20 -0000 1.5
***************
*** 25,28 ****
--- 25,29 ----
import java.awt.event.ActionEvent;
import java.io.File;
+ import java.lang.reflect.InvocationTargetException;
/**
***************
*** 44,65 ****
Thread t = new Thread() {
public void run() {
! File file = null;
! jarSpyGUI.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
! try {
! file = fileChooser.getSelectedFile();
! jarSpyGUI.setFile(file);
! } catch (Exception exc) {
! String msg = "File: " + (file != null ?
! file.getName() :
! "(unknown)") +
! "\n" +
! exc.getMessage();
! JOptionPane.showMessageDialog(jarSpyGUI,
! msg,
! "ERROR",
! JOptionPane.ERROR_MESSAGE);
! } finally {
! jarSpyGUI.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
! }
}
};
--- 45,71 ----
Thread t = new Thread() {
public void run() {
! File file = null;
! try {
! file = fileChooser.getSelectedFile();
! jarSpyGUI.setFile(file);
! } catch (Exception exc) {
! final String msg = "File: " + (file != null ?
! file.getName() :
! "(unknown)") +
! "\n" +
! exc.getMessage();
! try {
! SwingUtilities.invokeAndWait(new Runnable() {
! public void run() {
! JOptionPane.showMessageDialog(jarSpyGUI,
! msg,
! "ERROR",
! JOptionPane.ERROR_MESSAGE);
! }
! });
! } catch (InterruptedException e) {
! } catch (InvocationTargetException e) {
! }
! }
}
};
|