944,135 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1662
  • Java RSS
Feb 13th, 2005
0

Keylisteners and + - * /

Expand Post »
Im currently using method
getKeyText() and getKeyCode() like this

How do you listen for * - and + with keylisteners.
/ is the only one that works atm the rest won't get recognized for some reason

if(event.getKeyText(event.getKeyCode())).equals("/")){
//do something
}

that method works, but when I try using a + a - or a * nothing happens, maybe whenever I type * - + it isnt getting recognized or something? , like when I try * it places a number in the text field im using instead of showing a multi sign
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
Gink is offline Offline
46 posts
since Feb 2005
Feb 13th, 2005
0

Re: Keylisteners and + - * /

If anyone can write how to listen for - + or * it'd be helpful
Reputation Points: 10
Solved Threads: 0
Light Poster
Gink is offline Offline
46 posts
since Feb 2005

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: Looking for peer to peer programming resources
Next Thread in Java Forum Timeline: applet , Runnable interface and problems





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


Follow us on Twitter


© 2011 DaniWeb® LLC