• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error message Lat1 isn't abstract method

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..

 
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic