Skip to content

Instantly share code, notes, and snippets.

/g

Created April 25, 2017 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/42ae0a57e2a7cdc61d449bf4da78a389 to your computer and use it in GitHub Desktop.
Save anonymous/42ae0a57e2a7cdc61d449bf4da78a389 to your computer and use it in GitHub Desktop.
public int getTxt_first_score() {
int a = Integer.parseInt(txt_first_score.getText());
while (a > 100 || a < 0 ) {
JOptionPane.showMessageDialog(null, "try again");
a = Integer.parseInt(txt_first_score.getText());
}
return Integer.parseInt(txt_first_score.getText());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment