/*please helpme! how can i get the number of times on how i attemp to get the correct answer!
please help me customize my inputbox
i am new to this!
this is a project of mine
please help:mrgreen: :mrgreen: :mrgreen: */
import java.util.*;
import javax.swing.JOptionPane;
public class Project{
public static void main(String []args){
String hula="";
String again="";
int ulit;
int hinula;
do{
Random rand = new Random();
int num = rand.nextInt(100);
do{
hula = JOptionPane.showInputDialog("Please enter your hula " );
hinula = Integer.parseInt(hula);
if (hinula>num)
JOptionPane.showMessageDialog(null, "Lower!");
else if (hinula < num)
JOptionPane.showMessageDialog(null, "Higher!");
}while (hinula !=num);
JOptionPane.showMessageDialog(null, " Congrats! ");
again = JOptionPane.showInputDialog(" Do you want to play again?Press 1 for Yes and any number for No");
ulit = Integer.parseInt(again);
}while (ulit==1);
System.exit(0);
}
}