Obtaining Hardcopy with BlueJ

Handing in your lab and program assignments usually consists of providing me with a copy of the Java code you have generated, and of the output of the program as it runs.

Printing Java Code

Getting a copy of the code is easy. From within BlueJ you open the file, then use the Print item from within the File menu. (Or, using the usual short hand, select Class->Print.)

Before you print your code, make sure you place your name in the program's header comment, so that I will be able to distinguish your code from someone else's. This is particularly important in the lab, because many people are using the same printer, and you want to be able to identify your output.

Printing Graphical Output

Providing program output is a bit trickier. If your output is just text (such as that provided by the program, Count.java, from Lab 1), bring the Terminal Window to the front. (If necessary, rerun your program.)

  1. Note that there's no option to print the Terminal window. (Check under the Options menu.)
  2. To print a Terminal window's content, you have to save it as a file first. Select Options->Save, and save your output as a text file (with a .txt extension). Pay attention to the name of the directory in which you are saving the file. It should be in your project's directory.
  3. Now you can open this text file using a program like WordPad to print it out. (You can find WordPad under Start -> Accessories -> WordPad.)
  4. You can use your WordPad (or equivalent) program to print the file.

If your output is graphical--generated by running an applet--then from within the appletviewer window you should be able to select Applet->Print... to print the output. For applets involving color, you should try to use a color printer, if you have one. If this is impossible, just use grey scale.

If your assignment called for writing or manipulating an html document to show your applet, you should hand in a copy of that, too.