I am believing I have seen answer before but can't find. The code I have from before is:
public void seedRandomGenerator(){
try{
long seedNumber = Long.parseLong(txtNumberSeed.getText());
Random random = new Random(seedNumber);
randomNumber = 1 + random.nextInt(nameCounter-1);
System.out.print(randomNumber);
JOptionPane.showMessageDialog(null,"New Seed Value in use","Error",JOptionPane.INFORMATION_MESSAGE); txtNumberSeed.setText(""
;
}
catch(IllegalArgumentException illegalArgumentException){
JOptionPane.showMessageDialog(null,"Please input a Random Seed Value","Error",JOptionPane.INFORMATION_MESSAGE); }
}
But same number comes back is problem.
Thanks
Uray
public void seedRandomGenerator(){
try{
long seedNumber = Long.parseLong(txtNumberSeed.getText());
Random random = new Random(seedNumber);
randomNumber = 1 + random.nextInt(nameCounter-1);
System.out.print(randomNumber);
JOptionPane.showMessageDialog(null,"New Seed Value in use","Error",JOptionPane.INFORMATION_MESSAGE); txtNumberSeed.setText(""
}
catch(IllegalArgumentException illegalArgumentException){
JOptionPane.showMessageDialog(null,"Please input a Random Seed Value","Error",JOptionPane.INFORMATION_MESSAGE); }
}
But same number comes back is problem.
Thanks
Uray