I don't the material realization of this requirement, But I had seen the same problem and the method to resolve it. you can set a sub frame to unvisible when the main frame is set to icon mode, in these case, the subframe can also capture the key event too. Good luck.
An other way for it is that you can set a sub frame out of the screen. Sincerely to say, these are not the professional scheme, you could refe to Java API for more information and good resolution. Good luck.
thanks a lot to JonsenElizee
I have tried but it didn't take any effort.The JFrame had lost its focus, so the key event didn't work any more.
But I had seen the same problem and the method to resolve it.
you can set a sub frame to unvisible when the main frame is set to icon mode, in these case, the subframe can also capture the key event too.
Good luck.
Sincerely to say, these are not the professional scheme, you could refe to Java API for more information and good resolution.
Good luck.