if(Game.gameRoom == Room.RoomThree){
if(key != KeyEvent.VK_SPACE){
keycode = e.getKeyCode();
Code += KeyEvent.getKeyText(keycode);
Code = Code.toLowerCase();
System.out.println(Code);
if(Code == "switch horses"){
handler.addObject(new KeysBtn(300, 385, ID.Key));
System.out.println("Correct");
Code = "";
}
}
For this code it types out what I type on the key bord the only problem even though i have typed the Code "switch horses" it dose not print Correct in the consol.