Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15288
39
Android IntelliJ IDE Java Scala Spring
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic