• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error message Lat1 isn't abstract method

 
ethaniel landfough
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic