Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Open and Close OnScreen Keyboard while focus gain on JTextField

996280Aug 20 2013 — edited Aug 23 2013

Hi

I have a Jtextfield when ever I click on textfield I want to open OSK(On Screen Keyboard) of Windows 8 OS and windows 7.

I tried in below mentioned way to open and close in focus listener focusGained() and focusLost() but it is not working. could some body do needful.

Opening OSK:

builder = new ProcessBuilder("cmd /c " + sysroot + " /System32/osk.exe");

Closing Osk:

Runtime.getRuntime().exec("taskkill /f /im osk.exe");

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2013
Added on Aug 20 2013
1 comment
1,854 views