So I have code that when you press the mouse it will generate some random code in a text box, then when enter is hit, it is suppose to clear said textbox and replace is with a new random string but it just picks the same random string. E.g. I click the mouse and "hps" is generated, I click enter and "hps" is generated again. Is there a way to get a new string from my generator?
public void mouseClicked(MouseEvent arg0) {
RandSt string = new RandSt();
textField_tf.setText(string.randStr());
}