12.12 BorderPane Layout, Animations, Sounds, and Lambda Expressions

We have a lot to talk about in this section. We introduce a new layout class, BorderPane. We demonstrate animating nodes with some accompanying sound. And we explain using lambda expressions for event handlers.

A BorderPane layout container organizes its nodes into five positions: top, bottom, left, right, and center, with each position holding, at most, one node. The size of each position expands or contracts depending on the size of the node in that position, the sizes of the nodes in the other positions, and whether the other positions contain a node. The center position expands to fill any remaining space; if not enough space is allocated, some positions may overlap other ...

Get Java Illuminated, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.