math.random help

I'm working on a project. I need to make a section on a page to have the viewer be prompted to input a number and then based on that number to have 3 random integers generated from 0- the number they put in. Any help? Thank you so much.
[244 byte] By [bradenfishera] at [2007-11-26 17:35:32]
# 1
Have a look at the Random.nextInt(<some_maximum>) method.kind regards,Jos
JosAHa at 2007-7-9 0:03:32 > top of Java-index,Java Essentials,New To Java...
# 2
So how would i get it to so a prompt menu would come up so a viewer can set that maximum?
bradenfishera at 2007-7-9 0:03:32 > top of Java-index,Java Essentials,New To Java...
# 3

> So how would i get it to so a prompt menu would come

> up so a viewer can set that maximum?

Huh? Your topic title suggested, at least to me, that your question

was about random numbers?

Nevertheless, have a look at the JOptionPane class.

kind regards,

Jos

JosAHa at 2007-7-9 0:03:32 > top of Java-index,Java Essentials,New To Java...
# 4

Sorry i wasn't real clear.

So i put in this information

number1=prompt("Enter a number greater than 0","");

number1=parseFloat(number1);

how would i now use that number the viewer inputed and set that as the maximum for the range of random number can be.

thanks again

bradenfishera at 2007-7-9 0:03:32 > top of Java-index,Java Essentials,New To Java...
# 5
I think we've come full circle; look at reply #1, again.
DrLaszloJamfa at 2007-7-9 0:03:32 > top of Java-index,Java Essentials,New To Java...
# 6
You must put JOptionPane message in a loop, doing input while this is not a positive number. When you have this positive number, you pass this to method nextInt() of a instance of java.util.Random class. OK?
govisagod512a at 2007-7-9 0:03:32 > top of Java-index,Java Essentials,New To Java...
# 7
> I think we've come full circleActually, I think "going 'round in circles" would be more accurate: this was a JavaScript question. :-/
uncle_alicea at 2007-7-9 0:03:32 > top of Java-index,Java Essentials,New To Java...