GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("DeleteExperiment") { public void run() { deleteExperimentFromDatabase(); GUIUtils.timeConsumingTaskEnd(organizer); } }.start(); } catch (RuntimeException re) { System.out.println("Runtime exception deleting experiment: " + re); re.printStackTrace(); GUIUtils.timeConsumingTaskEnd(organizer); }
deleteExperimentFromDatabase();
      public void actionPerformed(ActionEvent e) {        GUIUtils.timeConsumingTaskStart(organizer);        try {          new Thread("DeleteExperiment") {            public void run() {              deleteExperimentFromDatabase();              GUIUtils.timeConsumingTaskEnd(organizer);            }          }.start();        } catch (RuntimeException re) {          System.out.println("Runtime exception deleting experiment: " + re);          re.printStackTrace();          GUIUtils.timeConsumingTaskEnd(organizer);        }      }