Skip to main content

JavaFX 1.2: lots of new good things, some price to pay

Posted by fabriziogiudici on June 2, 2009 at 3:22 AM PDT

So, JavaFX 1.2 is out and you can download it from (note: when you press the "Download now" button you'll still see 1.1.1, just click on the bottom link "See downloads for other platforms"). Yes, there's the Linux version too ;-) And Solaris too.

The news items are in a good number, not only at level of APIs (whole new packages, including - thanks God - various types of controls), but at the language level too. Multiple inheritance has gone away (excellent!), replaced by explicit mixin support; you have to use commas to separate elements in sequences; you can't any longer shadow variables in nested blocks, and so on. I won't repeat here the very good change list that Steve on Java already prepared: have a look at it, it has been extremely useful for me.

The mixin support sounds as one of the most interesting things at language level - but I couldn't find yet a document explaining how it is implemented (there are still broken links on JavaFX sites that point back to 1.1 docs) - I just supposed it is a classic mixin and just put the "mixin" keyword in the few cases where I needed it. Of course I'll go deeper in it when the docs are available.

The price to pay is that, most likely, your application developed with JavaFX 1.1(.1) won't ever compile. blueBill Mobile didn't. After a few hours I got it to compile (unfortunately, the thing needs longer than expected, since NetBeans support hasn't been updated yet and the editor gets even more messed up). The compiler seems much more stable, but I was however able to crash it once :o)

After fixing the source, the application still doesn't work. There are nodes that aren't immediately visible, and in one of the screens where there is a list of items I first got a StackOverflowError, later - after some change - an OutOfMemoryError. Hmm... It is to be said that the implementation I wrote of the List was very quick, as I bet that new components were coming with 1.2. So I think I'll try first replacing my old, home-made controls with the new ones. Also, I'm also aware that there have been changes in the behaviour of nodes and I'm getting some compiler and runtime warnings that I have to investigate on.

Stay tuned for the progress. Once I fix blueBill Mobile for JavaFX 1.2 I'll make it available for playing around. And of course, if you're at JavaOne, don't miss JavaFX talks.


The link to Steve's blog is broken. I think there is an extra space in the href attribute. S!