What is ScalaFX?

ScalaFX is a thin, idiomatic Scala wrapper around JavaFX. JavaFX is a mature, feature-rich GUI toolkit (layouts, controls, CSS styling, animation, 2D/3D graphics) with API written for Java: verbose builder patterns, listener interfaces, and mutable getters/setters everywhere. ScalaFX takes that same underlying engine and exposes it through a Scala-friendly API.

Because ScalaFX is a wrapper, with some enhancements, everything you may already know (or will learn) about JavaFX concepts — Stage, Scene, Node, layouts, CSS, FXML — transfers directly to ScalaFX. JavaFX tutorials or the official JavaFX docs remain useful references; ScalaFX changes the surface syntax for more idiomatic Scala use.

When to reach for ScalaFX: if you're building a desktop GUI in Scala and want a native look, rich widget set, and CSS-based styling without leaving the JVM ecosystem, wherever JavaFX is supported, ScalaFX is the standard choice. It's not for web or mobile UIs.