Posts

Showing posts with the label NetBeans

False condition comes true?

Image
This is a really weird bug I found in my program. I have an "if" condition, which takes a boolean variable as its condition, the variable's name is bMember. When I saw unexpected behaviour in my code and decided to debug it I saw the above surprising and un-understandable thing, the debug enters a falsed condition!? look at the picture above and see for yourselves. by the way, if someone knows why, please post a comment. Chaiavi

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...