Reputation: 463
i plan to make a java onscreen keyboard for my windows 8 tablet, now i have a semi transparent always-on-top jframe, the problem is when i start pressing the buttons on it the focus is gained by jframe and the window i am typing on will lose focus and nothing would be typed in there, is there a way that MouseClicked is launched on an non-focused Jframe
Upvotes: 0
Views: 406
Reputation: 324207
Use a JDialog for this, not a JFrame since an application should only have a single JFrame.
Then you can use:
dialog.setFocusableWindowState( false );
Upvotes: 4