java - How to display random numbers in jlabel? -


i need how display random number in jlabel java used

random sum1 = new random();  jlabel1.settext(random1); 

random class used generate random numbers - need use calling 1 of nextwhatever methods:

random r = new random(); jlabel1.settext(string.valueof(r.nextint()); 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -