I am very happy to announce the immediate availability of FormsFX, a framework for (surprise!) creating forms in JavaFX. FormsFX is the result of a student project at the “Fachhochschule Nordwestschweiz” (FHNW) in Switzerland. The project was initiated and sponsored by me. I believe that the result of this project is of high quality and that other projects should be able to benefit from it, hence I am contributing it as an open source project to the Java community today.
The source code and documentation can be found on GitHub at this location: https://github.com/dlemmermann/formsfx
A binary distribution (JAR file) can be downloaded from my website.
The design and the implementation were done by Sacha Schmid and Rinesch Murugathas as part of their studies for their bachelor degree.
View, Model View, Model
The form renderer of FormsFX will automatically create a form for you based on a view model. The view model defines bindings to the properties of the domain model / business model. The renderer utilises a twelve column layout (similar to bootstrap). Labels and their fields can be placed on one or more of those columns. Each field defines its own column span. If there is not enough space left for a field then it will be automatically placed on the next row. The screenshot below shows you the form created by the demo application that ships with FormsFX.
The fluent API of FormsFX allows you to create a view model for a form that consists of several groups and sections. A group and a section can consist of several fields. The difference between a group and a section is simply the additional title property and the fact that sections can be expanded / collapsed. The code below shows how the first three fields of the screenshot above were defined.