Results 1 to 3 of 3

Thread: Error!

  1. #1
    baig-sh is offline Member
    Join Date
    Nov 2011
    Posts
    35
    Rep Power
    0

    Default Error!

    import java.awt.* ;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.* ;
    import java.io.*;
    import java.util.*;
    import java.util.List.*;

    public class IdealWeight extends JFrame
    implements ChangeListener,ActionListener
    {

    this is the start of my file. All this was ok when i add the ActionListener at JRadio buttons compiler generate an error:

    D:\tutor\ex3>javac IdealWeight.java
    IdealWeight.java:9: IdealWeight is not abstract and does not override abstract method actionPerformed(
    java.awt.event.ActionEvent) in java.awt.event.ActionListener
    public class IdealWeight extends JFrame
    ^
    all code in one file.
    Please help me identify the prob.
    Thanks

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,051
    Blog Entries
    7
    Rep Power
    23

    Default Re: Error!

    That is not the code you tried to compile otherwise you would've gotten another error message from the compiler; most likely your class not claims that it implements the ActionListener interface but it doesn't have an actionPerformed(ActionEvent ae) method ...

    kind regards,

    Jos
    The only person who got everything done by Friday was Robinson Crusoe.

  3. #3
    baig-sh is offline Member
    Join Date
    Nov 2011
    Posts
    35
    Rep Power
    0

Similar Threads

  1. java out of memory error-heap space error
    By elsanthosh in forum NetBeans
    Replies: 4
    Last Post: 06-15-2010, 09:31 AM
  2. Replies: 1
    Last Post: 03-10-2010, 02:53 PM
  3. Replies: 1
    Last Post: 12-05-2009, 08:28 AM
  4. Replies: 1
    Last Post: 10-26-2009, 05:38 PM
  5. Replies: 3
    Last Post: 01-23-2009, 09:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •