Need Help!

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jul 2007
Posts: 108
Reputation: Majestics is an unknown quantity at this point 
Solved Threads: 7
Majestics Majestics is offline Offline
Junior Poster

Need Help!

 
0
  #1
May 30th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,210
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Need Help!

 
-1
  #2
May 30th, 2009
>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?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 108
Reputation: Majestics is an unknown quantity at this point 
Solved Threads: 7
Majestics Majestics is offline Offline
Junior Poster

Re: Need Help!

 
0
  #3
May 31st, 2009
I mean when I press 'A' in the keyboard it generate function like Normal Hardware Keyboard and writes that word.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,210
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Need Help!

 
-1
  #4
May 31st, 2009
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 108
Reputation: Majestics is an unknown quantity at this point 
Solved Threads: 7
Majestics Majestics is offline Offline
Junior Poster

Re: Need Help!

 
0
  #5
May 31st, 2009
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?
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 979
Reputation: JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice 
Solved Threads: 145
JamesCherrill JamesCherrill is online now Online
Posting Shark

Re: Need Help!

 
1
  #6
May 31st, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,210
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Need Help!

 
-1
  #7
May 31st, 2009
As on-screen keyboard do you mean GUI where keys are represented as buttons?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 108
Reputation: Majestics is an unknown quantity at this point 
Solved Threads: 7
Majestics Majestics is offline Offline
Junior Poster

Re: Need Help!

 
0
  #8
May 31st, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 979
Reputation: JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice 
Solved Threads: 145
JamesCherrill JamesCherrill is online now Online
Posting Shark

Re: Need Help!

 
0
  #9
May 31st, 2009
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).
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 108
Reputation: Majestics is an unknown quantity at this point 
Solved Threads: 7
Majestics Majestics is offline Offline
Junior Poster

Re: Need Help!

 
0
  #10
May 31st, 2009
Great Help! Thank You Very Much.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC