Results 1 to 2 of 2

Thread: Error in class

  1. #1
    ai_2007 is offline Member
    Join Date
    Jun 2007
    Rep Power

    Default Error in class

    I have created a class for a GUI Frame. It has functions like add, delete, edit, etc. When I compile the class there are not syntax errors. But when I try to run the class, then there is an error that says :



    this line of code from the class is highlighted:

    Java Code:
     field[i] = new JTextField();
    Why is this and how do I correct it?

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Rep Power


    Let us know full code. :) and full error message which tells the line number.

    NullPointerException happens when you try to use an object reference which is null. But it is impossible to say exact reason by looking at that line ;)

Similar Threads

  1. Replies: 2
    Last Post: 09-22-2011, 09:48 PM
  2. Error: no class definition found
    By toby in forum New To Java
    Replies: 6
    Last Post: 08-28-2011, 10:32 PM
  3. cannot find symbol class error
    By po0oker in forum New To Java
    Replies: 5
    Last Post: 10-31-2007, 02:52 PM
  4. Replies: 1
    Last Post: 08-07-2007, 07:53 AM
  5. Replies: 1
    Last Post: 08-02-2007, 04:07 PM

Posting Permissions

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