void this_keyPressed(KeyEvent e) { if (this.getText().equalsIgnoreCase("a")) {this.setBackground(Color.green);} else if (this.getText().equalsIgnoreCase("b")) {this.setBackground(Color.cyan);} }