Another week, another bunch of Java desktop-related links. Keep up the hard work people, and always feel free to email me or leave a comment about anything I may have missed 🙂
- Carl Dea has put up the second part of his series discussing a JavaFX forms framework. This part covers the requirements and design of such a framework. For more context, have a look at part one of the series, which explains what a form framework is.
- James Clarke has a post detailing a NullPointerException he was encountering when using JMS. He provides a solution in his post on how to resolve this.
- Rakesh Menon has a post that details how to integrate JavaFX with YouTube so that JavaFX controls can be wrapped around a chromeless YouTube video.
- Jeff Frieson has continued his work on custom paints, and has written a very comprehensive article on java.net about it.
- Jim Weaver continues his series into developing BandmatesFX, adding a number of new bits of functionality / polish.
- Sergey Malenkov has a post showing off a ‘Score’ class he wrote in JavaFX, which is useful for games and applications that must show a count. Interestingly, the same Score class can be used to count in binary, octal, etc.
- Google announced this week that they have bought On2, the people behind the codecs used in JavaFX. How this plays out is anyones guess, but the JavaFX world appears to be pleased about it.
- Piliq.com posted a demo of a JavaFX ‘mini-map’ for a RTS game he is making. There is no code to see however.
- The Exadel blog has a post showing off the Seam booking demo using JavaFX.
- Phoenix (I wish people would use their actual names more often) has a post containing what he thinks are the 20 best JavaFX tutorials.
That’s us for another week. Catch you all next week.
Just a quick post to let anyone interested know that if you want a ‘Caspian-looking’ JavaFX menubar control, you can now find the one I was developing recently in the JFXtras project. It has not been included in any official release yet, so if you’re keen you’ll have to check it out from SVN.
There are a number of deficiencies with it, but certainly as a menubar it is functional. Since starting development on it my focus was on defining a simple API and locking it in. You can see an example of how to build a menubar if you’re interested. I’m pretty happy with how the API is now, so as the menubar improves you should feel fairly confident that you won’t need to update your code. In other words, please, use / thrash it and complain loudly (in a nice way) – it’s the only way you’ll get my attention. You can either email me privately (see contact details to the right), or leave a comment on this blog.
I hope this makes JavaFX a little more ‘enterprisey’. Hopefully soon we can have a number of extra JavaFX controls for people (like me) who build enterprise software.
Plenty of news this week, so lets get right into it.
- Leonid Bogdanov emailed me with some code he has been working on, as he thought it would be useful for other readers. He wrote a simple class that allows for a Java application (on any platform) to determine if there is already an instance of the program running. I’m sure many of us have had to write similar code before, so perhaps this is useful to some people out there. There is no license specified in the source file, however feel free to use it however you wish – consider it to be public domain code.
- Alex Ruiz posts about how he reorganised long unit test classes to be more readable and quicker to understand.
- There was a bit of a discussion recently about ‘Project Lombok‘, which looks like quite an interesting project to cut down on having to write boilerplate code. I recommend you spend a few minutes to watch the video to understand what it does.
Have a great week everyone.
A fairly quiet week this week in Java desktop land, but nonetheless some interesting news. Perhaps everyone is taking a deep breath prior to an Oracle acquisition. Regardless, let’s get straight into this weeks Java desktop links of the week.
- Cutting across both Swing and JavaFX is the need for good UI tests. The FEST project is one of the leaders in this area, and it is growing, with a number of new members this week alone. FEST is now looking to grow support for testing JavaFX user interfaces also.
- Željko emailed me to say that his Revolución Movie Library 0.7 beta has been released. This application has been linked to before from here, as it shows off what is possible with Swing. Note that this is a closed source application that’ll eventually not be free, and the current download is a 30-day trial.
- There is a discussion on whether component creation off of the EDT is really a bug. Frankly I didn’t even bother to read the article, as in my humble opinion it’s simple: anything relating to the UI should be performed on the EDT, and anything not relating to the UI should not be performed on the EDT (unless it is a very quick operation). It doesn’t get much more black and white than that.
- A new early release of the JavaFX Mobile runtime has been made available.
- Dean Iverson posted about using MigLayout in JavaFX 1.2. I haven’t had a chance to use this yet, but for anyone wanting to build form-based applications, this should be your first port of call.
- Steven Herod started an investigation into hardware acceleration of effects in JavaFX. After a number of issues were resolved, information started flowing (with the help of Dmitri Trembovetski and Chris Campbell from Sun). In short, if your hardware is recent, then effects should be hardware accelerated. For (a lot) more information, read the comments.
- Jim Weaver continues his series on BandMatesFX, with a number of improvements.
- Sang Shin has announced that a second session of the free 15-week JavaFX programming course will start on August 25th.
- Rakesh Menon gives an example of how to get drag-n-drop support in JavaFX. He does this by wrapping JavaFX Nodes in SwingComponents. In other words, drag-and-drop is not yet supported natively in JavaFX, so this is the next best thing.
- In another post, Rakesh attempts to continue to refine the node bounds discussion that has been going around recently.
- Stephen Chin officially announced a new community site for people wanting to learn JavaFX (which I pre-announced last week). I apologise in advance for not yet starting to maintain the links section. Hopefully I may be getting help from Carl Dea.
- Stephen Chin also posts a summary of this years Java client JavaOne Rockstars. Congratulations to all of them!
- Piliq.com has posted about how to give feedback/issues/bugs back to JavaFX developers at Sun. It’s well worth a read if you find anything bugging you. I have used it quite a bit recently, and they are really responsive (and JavaFX gets better because of it).
- Speaking of me, I posted a quick ‘menubar’ demo that I have been working on. It’s far from complete, but it is at least a good proof of concept that can be refined and improved as time permits.
That’s it for another week – hope you left a little wiser than when you entered. If not, demand your money back. Anywho, tune in next week – same bat-time, same bat-channel.
To continue developing my JavaFX skills I put in a few hours over the last week to build a menubar control. For those unsure on what a menubar is, it is the row at the top of an applications window (on most operating systems) that has the ‘File’, ‘Edit’, ‘Help’, etc menus. The menubar control is therefore responsible for making it easy to add and remove menus and menu items from the menu. For anyone interested in the API for my menubar, you can read the code that must be written to build the menu shown below.
I’m not wanting to go on about it too much now, as it is still in very early development, but you can play with it here. You’ll need to be running a recent Java release to get the best results. Of course, don’t expect much – what you see in the screenshot below is all you get (along with a bit of interactivity). Click the screenshot for a bigger image.
I’m also aware that it is lacking 🙂 Features such as accelerators, mnemonics, grouped menu items, submenu arrows, checks on checked menu items are all coming (some faster than others). As well as this, there are some layout issues that I need to work out – in particular menu width improvements, submenu positioning (overlap), text alignment, etc. Update: Note that the crossed-out tasks have been completed.
For now it’s a tech demo (for me) – hopefully as time permits it may find time to become more polished, and possibly even usable!