O'Reilly logo

JavaFX For Dummies by Doug Lowe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13

Drawing Shapes

In This Chapter

arrow Creating basic shapes such as lines, rectangles, circles, and ellipses

arrow Creating shapes you can see through

arrow Creating gradient fills

arrow Rotating, translating, and scaling shapes

arrow Drawing some text

arrow Combining shapes with union, intersect, and subtract operations

Were you one of those kids who, way back in school, passed away the boring hours of algebra class by doodling in the margins of the book? If so, you’re in luck. Now that you’re a grownup and you’re mastering JavaFX programming, you don’t have to doodle in the book. Instead, you can write programs that doodle onscreen.

This chapter is a brief introduction to the fascinating world of drawing in JavaFX. Specifically, you figure out how to draw two-dimensional objects such as lines, arcs, rectangles, ellipses, and so on. You can set the style used to draw the shape’s outline, and you can fill ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required