|
-
adding KeyListener to JPanel !!!!
hi....
In my program, i want to add mouse and key listeners to a JPanel. there is no problem with the mouse listener. But the keylistener is not working. my code looks like
myPanel.addMouseListener(this);
myPanel.addKeyListener(this);
my class implements these two listeners. the program compiles and it is running. i am not able to debug the error with keylistener. it seems key listener has not added to the JPanel. somebody pls help...
thanx...
sanu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks