I\'m trying to check if the UP and DOWN keys have been pressed with a Java swing timer. I got this code from this Stack Overflow answer but I can\'t figure out why it\'s not wor