220221222223224225226227228229230
getService.execute(); try { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); _service = getService.get(10, TimeUnit.SECONDS); } catch (Exception t) { new ErrorDialog(t).setVisible(true); } finally { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } } return _service;
241242243244245246247248249250
}; task.execute(); try { _customer = task.get(1, TimeUnit.SECONDS); } catch (Exception t) { new ErrorDialog(t).setVisible(true); } } return _customer; }
230231232233234235236237238239
try { _queryView.setText(_formatter.prettyPrint(queryString).toString()); List<Book> selectedBooks = get(1, TimeUnit.SECONDS); _selectPanel.updateDataModel(selectedBooks); } catch (Exception e) { new ErrorDialog(e).setVisible(true); } } }.execute(); }
453454455456457458459460461462
_items[i].setText(""); _items[i].setIcon(null); } _placeOrder.setEnabled(false); } catch (Exception e) { new ErrorDialog(e).setVisible(true); } } }.execute(); }
101102103104105106107108109110111
public void done() { try { _lowInventories.getDataModel().updateData(get(1, TimeUnit.SECONDS)); } catch (Exception e) { new ErrorDialog(e).setVisible(true); } } }.execute(); }
128129130131132133134135136
}; worker.execute(); try { return worker.get(); } catch (Exception e) { new ErrorDialog(e).setVisible(true); } return Collections.emptyList(); }
38394041424344454647
uncaughtException(Thread.currentThread(), e); } public void uncaughtException(Thread t, Throwable e) { if (SwingUtilities.isEventDispatchThread()) { new ErrorDialog(null, Images.ERROR, e).setVisible(true); } else { e.printStackTrace(); } }
133134135136137138139140141142143
try { List<PurchaseOrder> updated = get(10, TimeUnit.SECONDS); _orders.getDataModel().updateData(updated); _title.setText(updated.size() + "" + " Updated PurchaseOrder"); } catch (Exception e) { new ErrorDialog(e).setVisible(true); } } }.execute(); } });
158159160161162163164165166
}; worker.execute(); try { return worker.get(); } catch (Exception e) { new ErrorDialog(e).setVisible(true); return Collections.emptyList(); } }
227228229230231232233234235236