public void finished() { SwingUtilities.invokeLater(new Runnable() { public void run() { shareTable.updateUI(); prioritaetAufheben.setEnabled(true); prioritaetSetzen.setEnabled(true); neuLaden.setEnabled(true); } }); } }; worker.start();
}.start();
            public void actionPerformed(ActionEvent ae) {                prioritaetAufheben.setEnabled(false);                prioritaetSetzen.setEnabled(false);                neuLaden.setEnabled(false);                final SwingWorker worker = new SwingWorker() {                    public Object construct() {                        try{                            int prio = ((Integer) cmbPrio.getSelectedItem()).intValue();                            Object[] values = shareTable.getSelectedItems();                            if (values == null)                                return null;                            ShareNode shareNode = null;                            for (int i = 0; i < values.length; i++)                            {                                shareNode = (ShareNode) values[i];                                shareNode.setPriority(prio);                            }                        }                        catch (Exception e)                        {                            if (logger.isEnabledFor(Level.ERROR))                                logger.error("Unbehandelte Exception", e);                        }                        return null;                    }                    public void finished() {                        SwingUtilities.invokeLater(new Runnable() {                            public void run() {                                shareTable.updateUI();                                prioritaetAufheben.setEnabled(true);                                prioritaetSetzen.setEnabled(true);                                neuLaden.setEnabled(true);                            }                        });                    }                };                worker.start();            }