Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By DarrylBurke

Thread: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

  1. #1
    Aksh is offline Member
    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Question Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    The following error occurs when i compile my code.

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.ImageIcon.<init>(ImageIcon.java:138)
    at Frame1.initComponents(Frame1.java:438)
    at Frame1.<init>(Frame1.java:30)
    at Frame1$18.run(Frame1.java:710)
    at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 597)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:121)
    BUILD SUCCESSFUL (total time: 1 second)

    how do i debug it...?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,193
    Rep Power
    19

    Default Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    Learn to write Swing code. The NetBeans visual designer isn't a beginners' tool.

    db
    quad64bit likes this.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    5

    Default Re: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.ImageIcon.<init>(ImageIcon.java:138)
    Are you sure that the path/url to your image file is correct? Do you use the getResource method of the class object? Note that a leading slash indicates an absolute path (otherwise its relative to the package of the class!)

Similar Threads

  1. Replies: 11
    Last Post: 09-24-2012, 03:37 AM
  2. Replies: 2
    Last Post: 10-01-2011, 02:18 AM
  3. Replies: 1
    Last Post: 12-13-2010, 03:19 PM
  4. Replies: 3
    Last Post: 04-30-2010, 07:44 PM
  5. Replies: 5
    Last Post: 08-26-2009, 11:37 AM

Tags for this Thread

Posting Permissions

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