N
Nicole
Gast
Hallo!
Ich benutze in meinem Programm showInpuDialog. Allerdings bricht es nicht ab, wenn ich auf den Button Abbrechen klicke.
Hat jemand ein Idee, wieso nicht?
Grüße,
Nicole
Ich benutze in meinem Programm showInpuDialog. Allerdings bricht es nicht ab, wenn ich auf den Button Abbrechen klicke.
Code:
while ( true )
{
try
{
String s = JOptionPane.showInputDialog("How many groups?");
groups = Integer.parseInt( s );
break;
}
catch ( NumberFormatException e )
{
JOptionPane.showMessageDialog(null, "Please correct your input!" );
}
}
Hat jemand ein Idee, wieso nicht?
Grüße,
Nicole