In This Posting, I wrote that Java / RAD – ie Swing – Support could be added to the free version of Eclipse.
Well as a follow-up, I just wanted to mention that the Window Builder that this procedure installed, is not extensible. This can be quite limiting.
Instead, a better approach might be to install “Net Beans“, even under Linux. This IDE will support OpenJDK 7. We do need to make sure though, that we do not only have the JRE package installed, but also the JDK (development) package. It is a bit harder to set up than the other one, but has as advantage a Component Palette which is extensible.
After installing Net Beans, the thing to do is to add some sort of standard, built-in Swing component, thereby making the Component Palette visible in the IDE. We have our Swing Designer at that point. Then, under Linux, it is possible to add the Jar File ‘
/usr/share/java/swingx.jar‘ to Net Beans, by way of ‘Tools -> Libraries (Global Libraries)’. Then, we can right-click on the Project and click on ‘Properties -> Libraries’, and add the newly-defined Library to the Project.
Next, we can right-click on the component palette, and open the Palette Manager, from which we first create a new Component Category. It will be empty. Then, still within the Palette Manager, we can add components at will From the newly defined Library. It will ask us which Category to add them to, and presumably we would add them to the Category we just created.
And at that point we will see, that we not only have components such as “JPanel”, but that we potentially have a large number of components, whose names begin with “JX”, such as “JXPanel” …
I never really knew, that Net Beans was so powerful, yet free. However, Net Beans is not open source, and to install it, we need to run their SH File as ‘root’. This could present a daunting leap of trust for some people. Also, even though this setup script wants to be run in root mode, it will also need to display a graphical wizard. This requirement has led to a common but minor error message with many users. And so, in user mode, we need to give the command ‘
xhost +‘ first, so that the root-mode process can access our X-server, and then after we have installed Net Beans, back in user mode, we give the command ‘
xhost -‘ again.