3 ms·
Recently I have built a few JavaFX apps (e.g. https://github.com/marcin-chwedczuk/rfid https://github.com/marcin-chwedczuk/rfid). Pros of JavaFX: - Easy to st
by 0xmarcin 5y ago
Recently I have built a few JavaFX apps (e.g. https://github.com/marcin-chwedczuk/rfid https://github.com/marcin-chwedczuk/rfid).
Pros of JavaFX:
- Easy to start if you are familiar with Java and Maven/Gradle.
- Cross platform by default, I ran my apps on macOS, Linux and Linux on Raspberry PI without any problems (just remember to avoid AnchorLayout).
- Can generate deb packages for Linux and DMG for macOS.
- There is a TestFX project for writing GUI "clicky" tests, library seems to no longer be actively maintained but covers all common cases.
- SceneBuilder, ScenicView tools for rapid GUI development.
Now the cons:
- Java 9 module crap, JavaFX is modularized and mixing modular and non-modular libs (e.g. Guava) is real pain.
- Controls are quite primitive there is a TableView for displaying tabular data but there are no column filters out of the box. There are some projects that provide custom controls but there are quite poor compared to what you would get with C# and WPF/WinForms.
- Poor documentation for less common use-cases.
- A lot of bugs and missing features e.g. tray icon in macOS, there are workarounds that _sometimes_ work but can cause a lot of other troubles (e.g. calling AWT api before JavaFX starts).
To sum up, if you know Java and it's build tools and you app is simple then I recommend checking JavaFX out. If you need a more complex GUI then better keep out from it.
- zorr 5y ago+1 for JavaFX and if you know Kotlin then TornadoFX. It's a Kotlin DSL for JavaFX that makes the code less verbose and adds data binding and helpers for tables/forms/menus etc.