This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When adding a component to the GUI Form, I will sometimes get an error message: "The component cannot be instantiated. Please make sure it is a JavaBeans component". To get the specific cause of this error, I have to check the log-files. This can cause some usability issues, particuarly for novice/casual NetBeans users who do not know where the log files can be found. This can also be misleading, particuarly if the class is *clearly* a JavaBean. A "Show Details" button that would display the error/exception thrown when trying to add the JavaBean would speed-up diagnosing this problem. Two examples of where this could help is issue 118148 (I believe this behavior is the "resolution" to issue 118148) and issue 121610. This can easily be replicated by creating a JPanel. In the constructor, add "throw new RuntimeException("Really annoying error message")". Then try to drag and drop the panel into another GUI form.
*** Issue 141162 has been marked as a duplicate of this issue. ***
Is there any updates on this? This type of thing could probably have helped resolve problem found in this forum post. http://forums.netbeans.org/post-92654.html This specific example provides sample code and possible workaround. The forum post mentions that it come in to play with NB 6.5.1, 6.9.1, and 7.0 beta.
*** Bug 213656 has been marked as a duplicate of this bug. ***
For now, see also http://wiki.netbeans.org/FaqFormCustomComponentTroubles.
Related: bug 83467.
See also bug 154197.
*** Bug 214896 has been marked as a duplicate of this bug. ***
The error messages from custom components when added do a form were improved in 7.3. There are more of them for specific cases and more explanatory (hopefully). It's also possible to show the exception that caused the failure. Also the error dialog when a GUI form is opened with errors can now show the exceptions. http://hg.netbeans.org/jet-main/rev/b23836f97c6f