SampleFX – Updating a Label

The humble label is probably one of the most used widgets in the UI designers toolkit so getting to know it inside and out is important. A common task it is to update a label to display some new information depending on the state of the application. Depending on where that new information comes from it can be trivial to update the label or require an understanding of threading and thread safety.Continue reading

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

JavaFX 2 Generic Editable Table Cells

A few days ago I wrote an article which gave a more complete example of editable table cells in JavaFX 2.0. In that article I promised another article discussing how to make generic editable tables cells since the first article just expected everything to be a string. I’m fairly happy with this solution to the problem of making formatted input cells but if anyone can suggest improvements I’d love to hear them.Continue reading