Advertisement
Guest User

Untitled

a guest
May 26th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public void getUserInput() {
  2. line1x1 = JOptionPane.showInputDialog(this, "Input a starting x value for line 1 (1-600)");
  3. int x1 = Integer.parseInt(line1x1);
  4. if (!(x1>=1 && x1<=600)){
  5. JOptionPane.showMessageDialog(this, "Value out of range. Please enter a value between 1 & 600.");
  6. line1x1 = JOptionPane.showInputDialog(this, "Input a starting x value for line 1 (1-600)");}
  7.  
  8. line1y1 = JOptionPane.showInputDialog(this, "Input a starting y value for line 1 (1-600)");
  9. int y1 = Integer.parseInt(line1y1);
  10. if (!(y1>=1 && y1<=600)){
  11. JOptionPane.showMessageDialog(this, "Value out of range. Please enter a value between 1 & 600.");
  12. line1y1 = JOptionPane.showInputDialog(this, "Input a starting y value for line 1 (1-600)");}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement