Search:

Type: Posts; User: Grot

Search: Search took 0.08 seconds.

  1. Replies
    9
    Views
    1,093

    Re: Can someone please explain this code for me?

    ok thanks Norm.
  2. Replies
    9
    Views
    1,093

    Re: Can someone please explain this code for me?

    What does the String myS = myField.getText(); do?
  3. Replies
    9
    Views
    1,093

    Re: Can someone please explain this code for me?

    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?
  4. Replies
    9
    Views
    1,093

    Re: Can someone please explain this code for me?

    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!
  5. Replies
    9
    Views
    1,093

    Can someone please explain this code for me?

    @Override
    public void keyPressed(KeyEvent e)
    {
    if (e.getKeyChar() == 'a' ){
    String myS = myField.getText();
    myLabel.setText(myS);
    myLabel2.setText(“”);
    }
    }
Results 1 to 5 of 5