This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Exception in thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.border.BevelBo" Watch "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.border.BevelBo" New topic
Author

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.border.BevelBo

Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 149

Hi all am getting this exceptional error

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.border.BevelBorder.<init>(BevelBorder.java:78)
at javax.swing.border.SoftBevelBorder.<init>(SoftBevelBorder.java:71)
at Pack1.WlcmScr.initComponents(WlcmScr.java:54)
at Pack1.WlcmScr.<init>(WlcmScr.java:17)
at Pack1.WlcmScr$1.run(WlcmScr.java:192)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)


and my code goes like this



please suggest what can I do?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

Look at line 34 of your code:

You are passing null for the third argument of the constructor of SoftBevelBorder. That's not allowed. Pass a Color instead of null.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.border.BevelBo
 
Similar Threads
Storing JTextField to variable
Pressing a button to open a new window
Problem With GUI of Net Beans
Symbol Not Found - What am I Missing?
Networked Programs that work across countries