Printing from the Applet

Printing, unfortunately, is a bit complicated because most browsers will not print applets. One way to do it at home, if you have Windows, is to press the PrintScreen key, which captures an image of your desktop. You can then paste this into an application such as Paint, and print from there.

In the lab, you can do it as follows:

  1. Use the applet to produce your graph. Resize the Netscape window (by dragging the bottom corners) so that it shows the graph but not too much more.
  2. Click on "xterm" at the top of the screen to get an xterm window. Resize and move this so that it doesn't overlap the Netscape window, at least not the part that you're interested in printing.
  3. Enter the following command in the xterm window.

    xwd|xpr|lpr

  4. The mouse cursor turns into a +. Move this into the Netscape window and click. You should hear a beep or two, and then the printer will print a page showing the Netscape window.