27.1 Introduction
[Note: JavaFX (Chapters 12, 13 and 22) is Java’s GUI, graphics and multimedia API of the future. This chapter is provided as is for those still interested in Swing GUIs.]
In this chapter, we overview several of Java’s capabilities for drawing two-dimensional shapes, controlling colors and controlling fonts. Part of Java’s initial appeal was its support for graphics that enabled programmers to visually enhance their applications. Java contains more sophisticated drawing capabilities as part of the Java 2D API (presented in this chapter) and its successor technology JavaFX (presented in Chapter 12 and two online chapters). This chapter begins by introducing many of Java’s original drawing capabilities. Next we present several ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access