Creating aggregate JavaFX bindings

The standard JavaFX API provides a class named Bindings that can be used to create all kinds of bindings your application may need. Methods in this class can be used to translate any Observable, ObservableValue, Binding, Expression, and/or Property into another Binding, regardless of their original type. Here’s for example how you could translate a StringProperty into an IntegerBinding, by exposing the length of the contained String: StringBinding sourceBinding = … // initialized elsewhere IntegerBinding lengthBinding = Bindings.createIntegerBinding( () -> sourceBinding.get().length(), sourceBinding); While quick and to the point we’re forced to read the value directly from the inputs (in this Read More


Announcing DesktopPaneFX

Recently at work we faced the need of implementing a user interface that delivered similar features as the ones exposed by Java Swing’s JDesktopPane but for JavaFX. Unfortunately JavaFX does not provide such component out of the box, nor do the most common JavaFX controls projects out there. There are however a few attempts to put something together but most never left the prototype stage or have been abandoned. That’s how I found JavaFXMDI, which seemed to have the right approach but was left unattended for close to 3 years. Fortunately the code was published as Open Source, thus after Read More


Contributing to JavaFX

Johan Vos (@johanvos) has setup a mirror of the official OpenJFX codebase as a repository at Github (https://github.com/javafxports/openjdk-jfx. This repository allows anyone interested in contributing to JavaFX to be able to send patches to the project. Would you like to join the efforts to move JavaFX forward? These are the steps you must follow with the current pipeline: Have a Github account. It only takes a few minutes to setup and it’s free! Have a bug/feature in mind you’d like to see fixed/added to JavaFX. Browse the list of open issues at https://github.com/javafxports/openjdk-jfx/issues to see if you can help; discussing Read More


Writing JavaFX applications with Kotlin

Hi there! Today I’ll like to show you how Kotlin can be used to write a JavaFX application. This particular example encompasses both runtime and buildtime aspects as I’ll also show how Gradle Kotlin Script can be used to build the project. Let’s get started! UPDATE: The code assumes you’re using Oracle JDK8 which includes JavaFX (jfxrt.jar) by default. Make sure you have a compatible JavaFX binary if you’re using a different JDK release, such as OpenJDK. You can install OpenJFX on Ubuntu by invoking sudo apt-get install openjfx for example. Update 2: You may encounter problems when attempting to Read More


Boost your JavaFX applications with Griffon

The Griffon team recently released version 2.11.0 live on stage at Gr8Conf EU, and with it comes the latest batch of updates and features that make it the best choice for writing JavaFX applications. In this post I’d like to showcase some of the features you may want to explore for your next JavaFX project. And don’t worry, you can still use these features in your application even if you do not use Griffon as your application framework of choice. Scroll to the end of the page to figure out how it can be done. JavaFX delivers a brand new Read More


ˆ Back To Top