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

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -