Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random Number Gerator

Status
Not open for further replies.

M626

Programmer
Mar 13, 2002
299
I have this case and I need to generate random numbers to displays at various places on the applet. Can anyone help?

case 2:
g.drawRect( 1 + i * 10, 10 + i * 10,
50 + i * 10, 50 + i * 10 );
break; // done processing case
 
Try java.util.Random or java.lang.Math.random(). Check the Javadocs for more information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top