this post was submitted on 15 Jul 2023
3 points (100.0% liked)

JavaFX

119 readers
1 users here now

JavaFX is a software platform and a graphical user interface (GUI) toolkit that allows developers to create rich and interactive applications for desktop, mobile, and embedded devices. It provides a powerful set of tools and APIs for building modern, visually appealing applications.

JavaFX was introduced as a successor to the Swing framework. It is designed to provide a more advanced and flexible way of developing user interfaces compared to Swing, with improved graphics and multimedia capabilities.

Rules

  1. No NSFW/NSFL content
  2. No service requests/offers
  3. Must be JavaFX related
  4. No politics

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 2 years ago

I don't know Scala, but it's easy to read the example code and understand what it does. A lot of it reminds me of how well JavaFX integrates with Kotlin.

The configuration code reads very similar to how Kotlin uses apply{} to do the same things.

What I wonder, though, is how much you actually need ScalaFX to do this? Does it fall into the same category as TornadoFX does with Kotlin?

For instance, in the example code it uses some sort of extension of Application which looks like it makes the Stage setup more declarative. But, presumably you could use the standard start() routine and use the same kind of syntax to configure primaryStage. So how much value does the custom Application actually add?