jyonkheel
jyonkheel

Reputation: 463

how a make a "non-focusable" java Jframe onscreen keyboard

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

Answers (1)

camickr
camickr

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

Related Questions