I am making on-screen keyboard in java. All what i want to know is how to get focus into the notepad or any other typing point , I mean when i press a key it type it into the typing point like a keyboard do. If any one know any thing about this please help me. Any hint .... I will be thankful to you.

>I am making on-screen keyboard in java.
This makes sense

>All what i want to know is how to get focus into the notepad or any other typing point , I mean when i press a key it type it into the typing point like a keyboard do.
This is non-sense. It doesn't give clear idea what you trying to do. Focus into notepad? Type in typing point?

I mean when I press 'A' in the keyboard it generate function like Normal Hardware Keyboard and writes that word.

When I press 'A' on my On-screen Keyboard then It should generate the interrupt like hardware keyboard. I mean this. In vb Made on-screen keyboard we send the key but in java how can we do this?

As on-screen keyboard do you mean GUI where keys are represented as buttons?

Thank you very much JamesCherrill , it solve my problem but still i am facing a problem is that how can i get focus of the place where i want to write some thing.

Is the focus needed in your app, or some other Windows application. If it's yours you can request focus thru the Swing API. If its some other Windows app this is not easy; you could use JNI to access the Windows api directly (difficult) or use PrecessBuilder to call something like cmdow ( http://www.commandline.co.uk/cmdow/index.html ) to set the focus for you (not so difficult, but not elegant either).

Great Help! Thank You Very Much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.