Reputation: 616
I'm trying to create an on-screen keyboard using JInternalFrame, but I'm having an obvious problem. Whenever I click a button on JInternalFrame I lose focus on the text field from the main window (a custom Component). Can I somehow prevent JInternalFrame from gaining the focus?
Upvotes: 0
Views: 55
Reputation: 324118
I'm trying to create an on-screen keyboard using JInternalFrame,
Don't use a JInternalFrame.
Instead use a non modal JDialog. Then you can use:
dialog.setFocusableWindowState(false);
to prevent the dialog from gaining focus.
Upvotes: 2