I have
public void mouseClicked(MouseEvent arg0) {
Number rs = new Number();
textField_tf.setText(rs.getRandom());
}
Seperate class
public class Number {
public int getRandom(){
Random rand = new Random();
return rand.nextInt(10) + 1;
}
}
When I click the button nothing is generated in the TextField. I'm quite new to programming but if anything could be pointed out where I'm going wrong would be appreciated.