Bug 213229

Summary: RFE: Please include SwingX in UI Builder by default (or provide easy plugin install)
Product: guibuilder Reporter: fommil <fommil>
Component: CodeAssignee: issues <issues.netbeans.org>
Status: RESOLVED DUPLICATE QA Contact: issues <issues.netbeans.org>
Priority: P3 CC: hmichel, jkovalsky
Version: 7.1.2   
Target Milestone: TBD   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:

Description fommil 2012-05-30 10:51:12 UTC
I only recently discovered the SwingX project - which is not a trivial project to track down these days! (What with migrations between jdesktop.org, swinglabs.org, java.net and recent changes in their maven groupId).

I think it is so useful that the widgets should be included, by default, in the Netbeans UI Builder. Manually adding the widgets is a real pain, but the added value to users of Netbeans would be incredible.

(Please note, their latest Maven upload was a damp squib and is missing both javadocs and source).
Comment 1 fommil 2012-05-30 19:30:32 UTC
Actually if you're looking into SwingX then it might be useful to add specific support for some of its containers - the GUI Editor currently doesn't allow adding components into e.g. JxCollapsablePanel
Comment 2 Michel Graciano 2012-05-31 14:07:01 UTC
@NB Team: Do you think a contrib project could fit this, or a third party project would fits better (java.net for example)?
Comment 3 Tomas Pavek 2012-06-12 08:52:38 UTC
I would prefer (same as the reporter) to have the SwingX standard part of NetBeans, rather than a plugin somewhere to install additionally. But either way of contribution/help would be welcome.

*** This bug has been marked as a duplicate of bug 198436 ***
Comment 4 fommil 2012-07-19 16:19:33 UTC
A hint as to what is going wrong with JxCollapsablePanel

According to http://netbeans.org/bugzilla/show_bug.cgi?id=215528

The conditions for recognizing a component as a container are:
* It must extend java.awt.Container.
* The instance created by default constructor must be empty.
* There is no isContainer false attribute in BeanDescriptor.

So if the default constructor has a component in it, is the component not being recognised as a Container? (even if the BeanInfo says isContainer = true).
Comment 5 Tomas Pavek 2012-07-19 16:37:59 UTC
I did not try or look at JxCollapsablePanel, but if it is not empty, it can't be used as a container. But it has the "content pane" which is empty. So the GUI builder just needs to know what the content pane is:
http://wiki.netbeans.org/FaqFormCustomContainerBean
Comment 6 Tomas Pavek 2012-07-19 16:42:40 UTC
So JXCollapsiblePaneBeanInfo contains the information about container delegate/content pane: http://grepcode.com/file/repo1.maven.org/maven2/org.swinglabs.swingx/swingx-beaninfo/1.6.3/org/jdesktop/swingx/JXCollapsiblePaneBeanInfo.java#JXCollapsiblePaneBeanInfo

So the problem must be in installing to NetBeans, the BeanInfo classes are probably missing. Note that for installing SwingX to palette it is necessary to first create a user library with all the JARs needed, then install to palette from this library.
Comment 7 fommil 2012-07-19 16:45:13 UTC
You're right - the BeanInfos were missing when I first tried adding a JXCollapsablePane to a JXCollabsablePaneContainer and it failed. When I added the BeanInfo jar, it wasn't fixed (due to the refresh of BeanInfo details as you said in the other bug report). The container issue works fine now - so that aspect of this bug report can be ignored.
Comment 8 mienamoo 2013-08-26 10:23:19 UTC
@fommil: Please add your vote to the duplicate. :)
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo