Results 1 to 2 of 2
- 06-29-2010, 12:14 PM #1sahildave1991 Guest
what is the problem in this program ?????
Java Code:package EventHandling; import java.awt.*; import java.awt.event.*; public class KeyEvents implements KeyListener { int i; public void keyPressed(KeyEvent e) { i= e.getKeyChar(); System.out.println("VALUE IS ::"+i); } public void keyReleased(KeyEvent e) {} public void keyTyped(KeyEvent e) {} }
i want to print the char value of each key i press...
wat is the problem...it is not responding //
-
I've no idea given the information you've provided for us as we don't know how you're using this class at all. Could it be that the component that is being listened to doesn't have focus? Again, we've no way of knowing.
Similar Threads
-
Problem in Program
By Abbinormal in forum New To JavaReplies: 9Last Post: 01-08-2010, 03:38 AM -
Problem with the below program
By srikanthnambu in forum Java 2DReplies: 1Last Post: 05-20-2009, 05:43 PM -
Gui program problem..
By mingming2009 in forum Advanced JavaReplies: 7Last Post: 04-03-2009, 05:15 AM -
Program problem
By arindamchkrbrty in forum New To JavaReplies: 8Last Post: 03-10-2009, 04:58 AM -
program problem
By amith in forum AWT / SwingReplies: 12Last Post: 05-16-2008, 08:07 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks