How do you apply a key listener for double tapping? That is, you hit once and it turns on, then you hit again and it turns off. I can do this though LWJGL Keyboard, but not though KeyEvent with AWT. How can you do this with AWT?
My Attempt:
public static void fullscreenKey(KeyEvent e2, JFrame frame)
{
int key = e2.getKeyCode();
if(key == KeyEvent.VK_F1)
{
fullscreen(false, frame);
f1 = false;
}
if(key == KeyEvent.VK_F1 && !f1)
{
fullscreen(true, frame);
f1 = true;
}
}
I also need to call this method in other classes.
It seems you are calling
fullscreentwice:You should maybe try: