Chapter 4Creating Shapes

Key Skills & Concepts

• Drawing lines to the screen

• Working with the context menu

• Creating complex shapes

In this chapter you will learn how to draw shapes to the screen. Shapes add interest and dimension to your applications. You will start by learning how to draw a basic line. From there you will move on to a polyline and then to a rectilinear shape. From these basic rectilinear shapes, you will move on to polygons and curvilinear shapes.


If you are interested in game development or other animation-based media, polygons are very important. Polygons create the base of most 3-D objects.

Drawing Shapes

You will be drawing shapes on your application, in this chapter, without the help of the Snippets menu. The ...

Get JavaFX A Beginners Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.