JavaFX 2 with JPA 2 and Drag and Drop – Part 1

After a bit of a break away doing other things I’m back on a project that uses JavaFX 2. So far this project hasn’t required much in the way of persistence either for settings or data but a new feature I’m working on makes use of a database. I use JPA 2 for web based projects and I’ve found it to be useful in most desktop applications as well so it was the natural choice here. How you go about bringing together JPA and JavaFX isn’t necessarily as obvious as it could be so I thought I’d write a small demonstration application. While writing the demo I decided I’d also have an explore of the drag and drop features of JavaFX and get it working with a TreeView which is a bit more challenging than with the other components.Continue reading

How to Modify the Default NetBeans Template

By default every single class that you create with NetBeans will start with a header that tells you how to change the template. This header has found it’s way into just about every file in all my projects and it serves no useful purpose, why it can’t just be an empty comment I don’t know but this document describes how to change it.Continue reading

Netbeans 7.3 Maven Profiler Issue

Neatbeans 7.3 has just been released (yeah) and, like every release it has brought a host of new bugs with it. I try not to document bugs because they tend not to be around for very long and bug databases are normally a better place to look but this one falls into the difficult to find category so I’ll document it here.Continue reading

NetBeans License Magic

As a general rule I don’t include license information at the top of each source file (I’m sure a lawyer would be outraged)  because no one but me should ever see the source. I’ve recently started work on an open source project though so I thought I’d best investigate how to get NetBeans to automatically include some Apache 2.0 license blurb at the top of each source file.Continue reading

JavaFX 2.0 and Maven – Part 4

The final part of the Maven JavaFX build is getting NetBeans to correctly run the application. This, it turns out, is more difficult than I expected. This discussion covers a the problems quite well and is worth a read. I will admit up front that the solution I give here is not pretty, in fact it’s a down right hack, but it works for me. If you have a better solution I’d love to hear it, please leave a comment below.Continue reading

JavaFX 2.0 and Maven – Part 3

This (hopefully) final instalment of this series of articles on building JavaFX applications with Maven will refine what was done in the previous article. The previous article got us to the point where we were able to build a stand alone JavaFX application this article aims to do that with flare and produce roughly the same output as a regular NetBeans Ant JavaFX project.Continue reading

JavaFX 2.0 and Maven

I decided to have a bit of a play with JavaFX 2.0 the other day as we have a project coming up that may be a good candidate for using it. My first impression of JavaFX 2.0 is generally very positive, it’s a lot like Swing with the sharp edges knocked off. I’d like to see more emphasis on regular controls rather than animations and 3D (as that’s what I want) but we can’t have everything. The big disappointment though is the total lack of support for Maven.Continue reading

Simple CRUD Example – Part 1

If you have ever developed a web application you’ll know that most of the code you write is not clever business logic that’s doing complicated calculations but actually fairly simple CRUD (Create, Reuse/Retrieve, Update, Delete) code. Since this is the type of code that gets written all the time it makes sense to know it inside and out and make sure it’s correct and optimized. This series of articles takes you through the creation of a simple CRUD application using the following technologies:Continue reading