Now that you have seen the Java2D API, we’ll enhance our ChalkTalk application using some of what you learned in this chapter.
In this section, we will add a simple printing feature to the ChalkTalk application. This feature allows the user to print the title of the course—”Introduction to Java,” for example—in large letters on a single sheet of paper. This is useful for printing signs that can be posted outside classrooms.
We will accomplish this in the following steps:
Copy the project from Chapter 11, “Swing,” to create a new project.
Add a pop-up menu to CoursePanel to present the printing option to the user.
Add event handlers to the menu items in the pop-up menu.
Implement the java.awt.Print interface in the ...