Posts

Showing posts with the label Swing

GUI in Java Revisited (2015)

Which GUI framework should I use for my Java application ? Brief History: AWT -> SWT -> Swing When I had to choose which IDE gives me the best Swing WYSIWYG builder Brief History: Eclipse crappy builder -> Netbeans Matisse -> Google's Windows Builder (donated to Eclipse) All of the above were my conclusions till 2014, but much had changed, HTML5 is rising with many many 3rd party frameworks Jquery MVC frameworks, JavaScript server side frameworks etc. In the Java scene, Oracle has introduced JavaFX several years ago but it wasn't built specifically for forms, and it had it's labor aches. Nowdays, JavaFX has matured much, Oracle has pushed Swing aside and introduced a very nice WYSIWYG form editor for JavaFX, and HTML5 isn't a myth but a very live framework. So what are my conclusions? Html5 sounds great, but I need some more straight forward out-of-the-box html5 with Java solution instead of a bunch of 3rd party J...

Eclipse Window Builder VS Netbeans GUI Builder (Matisse)

Java is a great programming language but it has a big flaw - it's GUI framework sucks! I am talking about building simple client-side applications. If you don't want to mess with any web gui framework then you are bound to use swing. You can always build swing writing the text and imagining how it will work but any smart programmer will search for a nice Swing GUI builder which will enable him/her to have a WYSIWYG sort of framework to work with. There are several options of WYSIWYG frameworks to pick from, the most noticeable till the July (2011) was Netbeans' "Matisse" GUI builder. There were others of course but none as free or as good as Matisse. The biggest flaw of Matisse is that it doesn't reside on the best IDE out there - eclipse, but it can be found only on netbeans which isn't as good as Eclipse (Doesn't even have a "hover" feature to name one great flaw of netbeans) so if you want to build a GUI suppo...

Coding java gui using Swing designing it with CSS

Building a GUI in java isn't complicated having netbeans as a great Swing gui builder. But what if we want to have some of the design left out of the code in a CSS file? As when building a java applet which should blend with a website, out best shot will be to use the same CSS file in the swing code as we use for the website. How can we design the GUI components using swing? We will use TK-UI's SwingCSSEngine (which is opensourced). Their documentation can be reached using the following link: http://tk-ui.sourceforge.net/user-guide/cssengine/swingcssengine.html How is it done? Download the libraries: http://sourceforge.net/projects/tk-ui/files/org.akrogen.tkui.css.swing/ Copy the jar files (also those in their "lib" directory [excluding the commons if you wish]) into your project's (the swing project) lib directory. In the code before initializing the swing components (a method which is actually called init...

Embed Nimbus's look and feel to your Java programs using Netbeans

This one gave me a little headache, cause it shouldn't really be an issue, but it turned out to be a non trivial tweak. What's the story? I use Netbeans 6.5 and Java 1.6.0_11 and I wanted my gui programs to "wear" the nimbus look and feel. How should I configure my netbeans gui builder to dress my program with the nimbus l&f? First thing I needed to configure my current project to use the latest JDK, it used as a default a previous version (1.6.0_07) which doesn't support the nimbus l&f. First thing was to add the latest jdk to the netbeans platform, go to Tools --> java platform and add the new jdk. The next task is to add the new jdk to the specific project; project properties --> Libraries and under the Java platform pick the new JDK to run this program.  Now that the JDK issue is set, it's time to set the actual L&F:  Project properties --> Application --> Desktop app --> Look & Feel --> com.sun.java.swing.plaf.nimbus.Nimb...