Canvas vs Scene in JavaFX: What Each Does and When to Use
A Scene holds the node graph of a JavaFX window, while a Canvas is a single node for immediate-mode drawing. Learn how they fit together and when to use each.
2,889 posts about Java: questions with answers, tutorials and articles, newest first.
A Scene holds the node graph of a JavaFX window, while a Canvas is a single node for immediate-mode drawing. Learn how they fit together and when to use each.
The JavaFX scene graph is a tree of Node objects rooted in a Scene. See how nodes, layout panes, events, CSS and threading work with runnable examples.
Build desktop GUIs with JavaFX: layout panes, controls, FXML controllers, data binding, background tasks, and packaging with jpackage.
Use Locale, ResourceBundle and locale-aware formatters to make a plain Java application support several languages and regions.
JEP 411 deprecated the Java Security Manager for removal in Java 17. See why it happened, what Java 24 did next, and what to use instead.
Java 17 is an LTS release with sealed classes, a new random generator API, strong encapsulation, and the features added since Java 11, such as records and text blocks.
Java 16 lets you test a type and bind a variable in one step with instanceof. See syntax, scope rules and practical examples.
Java 16 finalised records and instanceof patterns and added Stream.toList and Unix domain sockets. See each feature with examples.
Sealed classes close a type hierarchy to a known list of subtypes. See the syntax, the final, sealed and non-sealed rules, and how exhaustive switch uses them.
Java 15 finalised text blocks, made ZGC and Shenandoah production-ready and added hidden classes. See what it changed and where features ended up.
Java 14 previewed pattern matching for instanceof, binding a typed variable in the test itself. It became final in Java 16, and Java 21 added record patterns.
What Java 14 introduced, from switch expressions to preview records and helpful NPE messages, and where each feature ended up in later releases.
Text blocks use triple quotes for readable multi-line strings. See the syntax, indentation rules, escapes and version history from Java 13 to 15.
Java switch expressions return a value with arrow syntax and no fall-through. Learn yield, multiple labels, and when the feature became standard.
Java 12 previewed switch expressions and added Collectors.teeing, new String methods, Shenandoah and G1 improvements. Here is what each does today.
Java 11 lets you write var for lambda parameters so you can add annotations or final while keeping type inference. Learn the syntax, rules and when to use it.
A practical tour of the Java 11 LTS release with code examples, plus what was removed and how it compares with later LTS versions.
The var keyword, added in Java 10, infers the type of a local variable from its initializer. See the rules, limits, Java 11 lambda support and style guidance.
Java 9 modules group packages behind a module-info.java descriptor with explicit dependencies. See a working example, jlink and migration tips.
Java 9 introduced modules, JShell, immutable collection factories and private interface methods. Learn each feature with examples.