CSE 115/503 - Spring 2011 - Banner
  • CSE 115/503 - Spring 2011
CSE 115/503 - Spring 2011 - Navigation
CSE 115/503 - Spring 2011 - Lab 3

Lab 3
Last modified: March 08 2011 02:30:11 PM

CSE 115/503 - Spring 2011 - Announcements

Preparatory tasks

  • Log in
  • Start Eclipse
  • Switch to the CVS Repository Exploring perspective
  • Check out the SP2011-CSE115-Lab3 project from the Labs repository

Note that when you check out the skeleton, there is a package named deleteme with a file inside named DeleteMeeToo. If the project checked in to the repository doesn't have anything inside it, putting stuff in it is slightly more difficult for you so we put those two elements in the project as a placeholder. Delete them both now.

Create a new package in your project and name it drawing. In the drawing package, create a class named App.

You App class is the main class for a program that creates a JFrame with a drawing in it. The drawing can be of whatever you'd like, but your drawing must contain the following elements:

  • A DrawingCanvas (you can't put any graphics on the JFrame without it)
  • An instance of at least two different graphical components that have had their default size, location, and color changed.

Your program can contain more than the required components, but must contain at minimum these components.

All of the code for this should appear in the constructor of the App class. In order to see what you've created, use the DrJava Interactions pane to create an instance of your App object.

You can find information about the different graphics available to you here.

Submitting the Assignment

Submit the file through Eclipse. Make sure that you submit to the correct section. Due dates are summarized in the table below:

Recitation Due Date
A1 Monday, February 21st at 9:00pm
A2 & A5 Tuesday, February 22nd at 9:00pm
A3 & A6 Wednesday, February 23rd at 9:00pm
A4 Thursday, February 24th at 9:00pm

Grading Information

  1. deleteme package has been deleted (6 points)
  2. drawing package created in the project (7 points)
  3. There is a file named App.java created in the drawing package with a class named App defined in it. (10 points)
  4. JFrame (20 points)
    • A javax.swing.JFrame was created (5 points), the method pack() was called on it (5 points), the default close operation was set to EXIT_ON_CLOSE (5 points), and the frame’s visibility was set to true (5 points).
  5. DrawingCanvas (15 points)
    • A graphics.DrawingCanvas was created (10 points) and its size was set to some dimension (5 points).
  6. Graphics on Drawing Canvas (42 points)
    • Two different graphics were created and placed on the drawing canvas (12 points - 6 points each).
    • Each graphic had its size changed from the default (10 points - 5 points each), its location changed from the default (10 points - 5 points each), and its color changed from the default (10 points - 5 points each).

Lab authored by Adrienne Decker

CSE 115/503 - Spring 2011 - Footer

Page maintained by Adrienne Decker

Contact: adrienne@buffalo.edu | 130 Bell Hall | (716)645-3184