How to create number limitations with JOptionPane.showInputDialog(null, "");
<p>So I'm making a game as you can see but i need to make it so that the player cannot use more than 28 stat points. 
Can anyone help? 
Here is my code.</p>

<p>package fallout.pkg4.game;</p>

<p>import javax.swing.JOptionPane;</p>

<p>public class Fallout4Game 
{</p>

<pre><code>public static void main(String[] args)
{
  int pointsint2;

  int pointsint;
  String points;
  String points2;

  int resultint;
  String perc;
  int resultPerc;

  int result3;
  String end;
  int endParsed;

  int result4;
  String chari;
  int chariParsed;

  int result5;
  String inte;
  int inteParsed;

  int result6;
  String agi;
  int agiParsed;

  int result7;
  String luck;
  int luckParsed;

  Boolean error;

  points = JOptionPane.showInputDialog(null, "Welcome to Brandons first game. Please enter 28 to start.");

  JOptionPane.showMessageDialog(null,"You have " + points + " stats points. Choose wisley.....");

  JOptionPane.showMessageDialog(null,"You will be choosing your S.P.E.C.I.A.L. attributes");

  points2 = JOptionPane.showInputDialog(null, "STRENGTH You have " + points + " points.");

  if(JOptionInput &lt;= then )

  pointsint = Integer.parseInt(points);
  pointsint2 = Integer.parseInt(points2);
  resultint = pointsint - pointsint2;

  perc = JOptionPane.showInputDialog(null,"PERCEPTION You have " + resultint + " points left");

  resultPerc = Integer.parseInt(perc);
  result3 = resultint - resultPerc;

  end = JOptionPane.showInputDialog(null,"ENDURENCE You have " + result3 + " points left.");

  endParsed = Integer.parseInt(end);
  result4 = result3 - endParsed;

  chari = JOptionPane.showInputDialog(null,"CHARISMA You have " + result4 + " points left.");

  chariParsed = Integer.parseInt(chari);
  result5 = result4 - chariParsed;

  inte = JOptionPane.showInputDialog(null,"INTELIGENCE You have " + result5 + " points left.");

  inteParsed = Integer.parseInt(inte);
  result6 = result5 - inteParsed;

  agi = JOptionPane.showInputDialog(null,"AGILITY You have " + result6 + " points left");

  agiParsed = Integer.parseInt(agi);
  result7 = agiParsed - result6;

  luck = JOptionPane.showInputDialog(null,"LUCK You have " + result7 + " points left");

  luckParsed = Integer.parseInt(luck);

}
</code></pre>

<p>} </p>