By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,749 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,749 IT Pros & Developers. It's quick & easy.

NullPointerException when adding Event to JButton

P: 3
I am trying to edit the GUI of a project in Netbeans. In particular, I am trying to add new JButtons. I get a NullPointerException when I try to add an Event to any given JButton (even ones that already exist) in my application using the Design Editor.

I go about this by right-clicking on the JButton in the design editor, navigating to Events -> Action -> actionPerformed. The auto-generated code appears for a brief moment before it disappears and throws the NullPointerException. I am using NetBeans IDE 6.1 and JDK 6u7.

Below is the details of the exception. I am in dire need of a solution, but cannot find any solutions on the web, only old Bug tickets related to similar issues that have allegedly been fixed long ago. If anyone has some ideas, please assist me!

Expand|Select|Wrap|Line Numbers
  1. java.lang.NullPointerException
  2.     at org.netbeans.modules.form.JavaCodeGenerator.getPropertyCreator(
  3.     at org.netbeans.modules.form.JavaCodeGenerator.generatePropertyBeanSetterCode(
  4.     at org.netbeans.modules.form.JavaCodeGenerator.generatePropertySetter(
  5.     at org.netbeans.modules.form.JavaCodeGenerator.generateProperty(
  6.     at org.netbeans.modules.form.JavaCodeGenerator.generateComponentProperties(
  7.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  8.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  9.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  10.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  11.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  12.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  13.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  14.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  15.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  16.     at org.netbeans.modules.form.JavaCodeGenerator.addInitCode(
  17.     at org.netbeans.modules.form.JavaCodeGenerator.regenerateInitComponents(
  18.     at org.netbeans.modules.form.JavaCodeGenerator.regenerateCode(
  19.     at org.netbeans.modules.form.JavaCodeGenerator$FormListener.formChanged(
  20.     at org.netbeans.modules.form.FormModel.fireEvents(
  21.     at org.netbeans.modules.form.FormModel.fireEventBatch(
  22.     at org.netbeans.modules.form.FormModel.firePendingEvents(
  23.     at org.netbeans.modules.form.FormModel.access$000(
  24. [catch] at org.netbeans.modules.form.FormModel$
  25.     at java.awt.event.InvocationEvent.dispatch(
  26.     at java.awt.EventQueue.dispatchEvent(
  27.     at org.netbeans.core.TimableEventQueue.dispatchEvent(
  28.     at java.awt.EventDispatchThread.pumpOneEventForFilters(
  29.     at java.awt.EventDispatchThread.pumpEventsForFilter(
  30.     at java.awt.EventDispatchThread.pumpEventsForHierarchy(
  31.     at java.awt.EventDispatchThread.pumpEvents(
  32.     at java.awt.EventDispatchThread.pumpEvents(
  33.     at
Oct 2 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 392
This form is for Java programing questions. If you need help with Netbeans you need to post your question is form that covers Netbeans questions.
Oct 3 '08 #2

Expert 100+
P: 1,208
This is a double post. The user has posted the same question in the Software Dev forum.

If you would like delete this thread, and i will move the other thread to the MISC form and talk to the poster.
Oct 6 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.