Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes Error message Lat1 isn't abstract method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Error message Lat1 isn Watch "Error message Lat1 isn New topic
Author

Error message Lat1 isn't abstract method

ethaniel landfough
Greenhorn

Joined: Aug 16, 2009
Posts: 21
I'm adding KeyListener and ActionListener to a JTextField class. Can i add KeyListener and ActionListener together.. And i got this error :


C:\Users\ERIE\Desktop\CROSSJAVA\Lat1.java:5: Lat1 is not abstract and does not override abstract method keyTyped(java.awt.event.KeyEvent) in java.awt.event.KeyListener
public class Lat1 extends JFrame implements KeyListener, ActionListener {


I wonder why this happen? Can someone help me pointed out, what did i do wrong?Thank's..



ethaniel landfough
Greenhorn

Joined: Aug 16, 2009
Posts: 21
ethaniel landfough wrote:I'm adding KeyListener and ActionListener to a JTextField class. Can i add KeyListener and ActionListener together.. And i got this error :


C:\Users\ERIE\Desktop\CROSSJAVA\Lat1.java:5: Lat1 is not abstract and does not override abstract method keyTyped(java.awt.event.KeyEvent) in java.awt.event.KeyListener
public class Lat1 extends JFrame implements KeyListener, ActionListener {


Sorry, sorry. After i checked it again, i found what was wrong. I mismatch the typed of KeyTyped instead of keyTyped. So, it's already works now..
 
jQuery in Action, 2nd edition
 
subject: Error message Lat1 isn't abstract method
 
Similar Threads
Can I use repaint() on a JFrame?
Limit the character in JTextField
Problem with 2D array of JButton
Apply 2d array of answer to the right position of JTextField grid with JCheckBox
How to know which button being clicked?