[java]
public void actionPerformed(ActionEvent e) {
Thread thread = new Thread(new Runnable() {
public void run() {
try {
doExpensiveOperation();
}
catch(SomeException e) {
JOptionPane.showMessageDialog(….);
}
}
});
thread.start();
}
[/java]

Advertisements