Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News JavaFX in AppStores and Improved UI Framework

JavaFX in AppStores and Improved UI Framework

This item in japanese

Lire ce contenu en français

Gluon founder Johan Vos recently appeared on the podcast, discussing the growing usage of JavaFX for cross-platform mobile apps in App Stored. Meanwhile, ControlsFX 11 has been released to add new cross-platform visual components.

The work builds on substantial work driven by the OpenJFX community and Gluon as both have coordinated work to enable cross-platform apps. In the podcast, Vos discusses the changes that happened between former Java graphical frameworks Swing and AWT, neither of which have a noteworthy mobile presence. Various to-do list style apps exist in OpenJFX as well as two games: SpaceFX, a space-shooter for defeating enemy ships and asteroids that requires JDK 13, and 2048FX, a block-based math puzzle game. Developers can obtain the source code directly to run on their computer or raspberry pi, then cross-compile each game to run on their mobile device through the GraalVM-based native packaging system.

SpaceFX includes full documentation for building and deploying the game into a development computer and Apple iOS. The developer, Gerrit Grunwald, includes additional documentation for running the game in a browser through use of JPro. Unlike the deprecated browser plugin of Applet and Web Start applications, JPro does not use a plugin and instead uses native HTML, JavaScript, and CSS techniques combined with a backend system that manages some processing and storage. The resulting combination of tools is a single application built and developed once that runs on a desktop/laptop through standard Java, runs on mobile devices through Gluon, and runs in a browser through JPro.

The same podcast discusses performance of native applications across different platforms. Native-compiled Java applications leverage GPU acceleration on different devices over OpenGL and EGL. Mac users also automatically leverage a new rendering pipeline through JEP-382, which facilitates an under-the-hood shift from Apple’s deprecation of OpenGL to favor their newer Metal framework. Developers of OpenJFX applications can be aware of this underlying shift but are not required to engage the framework at this level, as the rendering happens automatically inside OpenJFX under a layer of abstraction.

Abhinay Agarwal announced the release of ControlsFX 11 to add a new SpreadsheetView and TableView2 for improving graphical application presentation. ControlsFX features a large array of interactive graphical components for building JavaFX applications, all of which can be seen in the open source FXSampler application. This includes many common components, such as GridView, Notifications, sliders, a TaskProgressView, and many other controls.

The ControlsFX team has built out strong documentation to match the framework itself. The online and downloadable JavaDoc contains clear and concise information about each component including code samples for how to initially use and populate the component. For example, the TaskProgressView documentation contains sample code to demonstrate a visual update of multiple background processes.

Developers looking at designing mobile applications can engage each tool to suit their needs. Standard Java implementations like Zulu and Adoptium as well as OpenJFX can be used freely, while Gluon (Gluon pricing) and JPro (JPro pricing) provide a mix of free and commercial products with different levels of usage.

Rate this Article