Java desktop links of the week, August 10

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 🙂

Swing

JavaFX

Groovy

SWT

That’s us for another week. Catch you all next week.

JavaFX Menubar Released

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.

Java desktop links of the week, August 3

Plenty of news this week, so lets get right into it.

General

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

Swing

JavaFX

Griffon

Have a great week everyone.

Java desktop links of the week, July 27

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.

General

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

Swing

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

JavaFX

Griffon

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.

JavaFX Menubar control

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.

menubar2a

menubar1a

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!