In Practice

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:

1.
Copy the project from Chapter 11, “Swing,” to create a new project.
2.
Add a pop-up menu to CoursePanel to present the printing option to the user.
3.
Add event handlers to the menu items in the pop-up menu.
4.
Implement the java.awt.Print interface in the ...

Get Borland® JBuilder™ Developer’s Guide 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.