I have a Java-application that needs to be brought to the foreground and you have to be able to press keys.
I thought about a timer. It's like you can play a game and press some keys and the timer will count.
I've got this
@Override
public void focusLost(FocusEvent arg0) {
System.out.println("Lost");
TimerFrame.toFront();
TimerFrame.requestFocus();
}
It's flashing in the taskbar and not focused all the time.