ok thanks Norm.
Type: Posts; User: Grot
ok thanks Norm.
What does the String myS = myField.getText(); do?
I think “” is supposed to be "".
From when I see in this code is that
if a key 'a' is pressed something happens
and it creates a space.
Am I right?
I got this code from a book but it didn't explain it, I edited it there so you can see it better
Thanks for the help Norm! you're a legend!
@Override
public void keyPressed(KeyEvent e)
{
if (e.getKeyChar() == 'a' ){
String myS = myField.getText();
myLabel.setText(myS);
myLabel2.setText(“”);
}
}