posted 21 years ago
Hi all,
I have code similar to that below, it all works fine when the user clicks the yes and no button, however when the user uses tab to select the button and presses enter to select the button, it doesn't perform as I want. I think maybe an extra event is produced, is this the case and how can I stop it??
int n = JOptionPane.showConfirmDialog(.....JOptionPane.YES_NO_OPTION)
if (n == JOptionPane.YES_OPTION) {
..........}
if(n == JOptionPane.NO_OPTION) {
............}
Cheers
luke