11-30-2009, 07:58 PM
(This post was last modified: 11-30-2009, 07:58 PM by Project Evolution.)
Code:
Random randomGen = new Random();
private String randomizeInt() {
int toInt = Integer.parseInt(jTextField4.getText());
int randomIndex = randomGen.nextInt(toInt);
String randomString = Integer.toString(randomIndex);
return randomString;
}
Code:
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
jTextField5.setText(randomizeInt());
}