Headless Testing with TestFX

Posted on Mon 11 April 2016 in JavaFX, Testing • Tagged with Eclipse, headless, JavaFX, Maven, Monocle, TestFX

Jérome Cambon wrote a nice introduction to TestFX and how to enable the headless mode using Monocle.

I tried to reproduce the steps he described for running my TestFX GUI tests in headless mode from Eclipse so I can keep using my mouse while they are running. The crux is …

Continue reading

A Potential Pitfall with the TextFormatter Class in JavaFX

Posted on Thu 07 April 2016 in JavaFX • Tagged with anchor, caret, cursor, eszett, Java, JavaFX, string conversion, text field, text formatter

A common use case for the TextFormatter class in JavaFX is a text field that should convert any lower-case character input into an upper-case character. This can be achieved easily by defining a filter for the text formatter as described here. A straightforward implementation could look like this:

private UnaryOperator …

Continue reading

The TextFormatter Class in JavaFX: How to Restrict User Input in a Text Field

Posted on Tue 05 April 2016 in JavaFX • Tagged with change listener, event, JavaFX, Richard Bair, text field, text formatter

There are a lot of code examples for restricting or modifying user input into a JavaFX text field. Most examples I have seen suggest adding a change listener to the text field's text property. Here's how you would allow only lower-case characters in your text field using the change listener …

Continue reading

Adding JavaFX Properties to a DTO

Posted on Mon 21 March 2016 in JavaFX • Tagged with annotations, DTO, FXForm2, JavaFX, JSR 303, UI, Wrapper

Now that I have understood what a DTO is good for, I'm thinking about ways to improve it. As they are right now, our DTOs are POJOs extended by JSR 303 annotations for defining constraints on their fields/methods. The annotations are duplicates of the annotations defined on the corresponding …

Continue reading

Can There Be Too Much of a Good Thing?

Posted on Wed 16 March 2016 in Design Patterns • Tagged with Java, JavaFX, UI

I recently worked on JavaFX UI code that was new to me. In order to extend the existing UI by a simple label, I needed access to a bean of the underlying data model. Much to my surprise, I had to dig deep to find it hidden under multiple layers …

Continue reading

Zooming in the Fancy Chart Control

Posted on Thu 24 April 2014 in JavaFX • Tagged with fancy chart, Github, JavaFX, zoom

A new version of the fancy chart control is available at https://github.com/tesis-dynaware/fancy-chart

This version supports zooming for the XY chart: by dragging the mouse, you can select an area in the chart to scale the selected area up to full size of the chart. This allows …

Continue reading

Headless UI Testing with TestFX and JavaFX 8

Posted on Wed 23 April 2014 in JavaFX • Tagged with build, headless, JavaFX, JDK, Monocle, TestFX

JavaFX is a great UI toolkit. TestFX is a great library for testing the user interfaces written in JavaFX. Writing graphical tests with TestFX is simple and fast, but one challenge remains when you build your software using a headless build machine: how can you perform your UI tests in …

Continue reading

Enhanced Fancy Chart

Posted on Fri 21 March 2014 in JavaFX • Tagged with CSV, fancy chart, Github, HDF5, JavaFX, XLS

A new version of the fancy chart control is available at https://github.com/tesis-dynaware/fancy-chart

Data can now be imported and exported to CSV, XLS, and HDF5 files. A lot of code was refactored to make it easier to support other file formats in the future.

Source Code for the Fancy Chart Control

Posted on Fri 14 March 2014 in JavaFX • Tagged with animation, fancy, Github, JavaFX, TableView

Due to popular demand, I published the source code for the combined LineChart and TableView control mentioned in this post to Github. You can find the sources here:


Visit Zombieland

Posted on Thu 13 March 2014 in 3D, JavaFX • Tagged with 3D, ASCII, binary, FBX, Github, JavaFX, JNI, zombie

We finally released our FBX importer code for JavaFX 8 on Github:


You can use it to load (binary) FBX files and show the result as a JavaFX 3D mesh. Have fun playing around and please don't hesitate to give us feedback.