JamesMadisonUniversity

CS Dept


CS 159 Lab: Graphics Introduction


Objectives:

Students will:
  • begin working with Graphics objects in Java
  • learn how to insert images into a Java component

New Terms:

JComponent (Java Swing)

2D Graphics

Materials:

Main lab : https://users.cs.jmu.edu/bernstdh/Web/common/labs/experimenting_graphics/index.php

Acknowledgment:

Lab by David Bernstein.

Corrections, clarifications here:

2.15 - Change the word stroke to draw. Buzzy
3.2 and 3.3 - Change the wording of "draw a line to" to draw a "line to". That should give you a hint as to the correct method to use.
4.9 - Think about the order in which you need to render the various elements. To draw the antenna under the helmet, you must draw it before you render the helmet itself.

 

 

Turning in your work

  1. For Prof Nancy Harris, Sections 1, 4, 5: Either demonstrate your working program in lab, or upload the completed ExpressionsGUI.java and Clicker.java programs to Canvas.
  2. For Prof Arch Harris, Sections 2, 3, demonstrate your program as far as you have gotten before you leave the lab.

 


Updated 03/27/2014 (nlh)