Wie kann ich einen Hörer auf die OK -Taste von JoptionPane hinzufügen?

int res = JOptionPane.showOptionDialog(null, "Hello", "Test", JOptionPane.DEFAULT_OPTION,
        JOptionPane.INFORMATION_MESSAGE, null, null, null);

System.out.println(res);
Mappy Show