This appendix provides additional code that shows you more ways
to do some of the things covered in the earlier chapters of this
book.
Print a Sales Report
The SalesReport.java
Applet class
prints a sales report with the rows split over multiple pages
with numbers at the bottom of each page.
Here is how the application looks when launched:
You need this policy file to launch the applet:
grant {
permission java.lang.RuntimePermission
"queuePrintJob";
};
To launch the applet assuming a policy file named
printpol and an HTML file named
SalesReport.html , you would type:
appletviewer -J-Djava.security.policy=printpol
SalesReport.html
This diagram shows how the report prints:
[TOP]
|