I have a problem with getting focus to a JFrame after unhiding it, I am running OS X.
Specifically,
I am setting the DEFAUL_CLOSE_OPERATION to be HIDE_ON_CLOSE then I am using jnativehook library to get a global shortcut to unhide the application, the unhiding works just fine, but the problem is that the frame doesn't get the focus and I can't use it till I click on it by the mouse.
I have tried all of these methods :
setVisibel(true);
requestFocus();
toFront();
setEnabled(true);
requestFocusInWindow();
setExtendedState(JFrame.NORMAL);
setState(Frame.NORMAL);
setAutoRequestFocus(true);
Any help will be extremely appreciated.