943,682 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 603
  • Java RSS
May 30th, 2009
0

Need Help!

Expand Post »
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.
Reputation Points: 188
Solved Threads: 44
Posting Pro
Majestics is offline Offline
554 posts
since Jul 2007
May 30th, 2009
-1

Re: Need Help!

>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?
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 871
Code tags enforcer
peter_budo is offline Offline
6,654 posts
since Dec 2004
May 31st, 2009
0

Re: Need Help!

I mean when I press 'A' in the keyboard it generate function like Normal Hardware Keyboard and writes that word.
Reputation Points: 188
Solved Threads: 44
Posting Pro
Majestics is offline Offline
554 posts
since Jul 2007
May 31st, 2009
-1

Re: Need Help!

Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 871
Code tags enforcer
peter_budo is offline Offline
6,654 posts
since Dec 2004
May 31st, 2009
0

Re: Need Help!

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?
Reputation Points: 188
Solved Threads: 44
Posting Pro
Majestics is offline Offline
554 posts
since Jul 2007
May 31st, 2009
1

Re: Need Help!

Maybe you can use the java.awt.Robot class. This was intended for automating tests of a GUI, and allows you to post mouse and keyboard events directly onto the host operating system's event queue.
http://java.sun.com/j2se/1.6.0/docs/...awt/Robot.html
Featured Poster
Reputation Points: 1907
Solved Threads: 950
Posting Expert
JamesCherrill is offline Offline
5,767 posts
since Apr 2008
May 31st, 2009
-1

Re: Need Help!

As on-screen keyboard do you mean GUI where keys are represented as buttons?
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 871
Code tags enforcer
peter_budo is offline Offline
6,654 posts
since Dec 2004
May 31st, 2009
0

Re: Need Help!

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.
Reputation Points: 188
Solved Threads: 44
Posting Pro
Majestics is offline Offline
554 posts
since Jul 2007
May 31st, 2009
0

Re: Need Help!

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).
Featured Poster
Reputation Points: 1907
Solved Threads: 950
Posting Expert
JamesCherrill is offline Offline
5,767 posts
since Apr 2008
May 31st, 2009
0

Re: Need Help!

Great Help! Thank You Very Much.
Reputation Points: 188
Solved Threads: 44
Posting Pro
Majestics is offline Offline
554 posts
since Jul 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: How get Image byte size & transfer Image over Socket?
Next Thread in Java Forum Timeline: car cann't move in the race





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC