Controlling Shape's color

Shape can have two colors: one for the interior (setFill method) and one for the border (setStroke). Color in JavaFX is handled by the Paint API, which is worth a deeper look:

Get Mastering JavaFX 10 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.