CSE1030Z Lab 08

Graphical User Interfaces

Wed Mar 06 2:30-4:00 PM
Thu Mar 07 2:30-4:00 PM

Introduction

This lab creates a simple image viewer application using Java Swing and the model-view-controller pattern. In this lab you will:

You should submit your work sometime today, and preferable before the end of the lab.

A Simple Image Viewer

The goal of this lab is to create a simple image viewer application. Before you start writing code, you should try out the final application to see how your completed application should behave. You can run the application from a terminal using the command:

java -jar /cse/dept/www/course/classpath/1030Z/viewer.jar

The application lets the user open one or more image files (using Open from the File menu). The Previous and Next buttons lets the user traverse the sequence of images. Notice that the application models the sequence of images as having a first image and a last image; the user cannot traverse to the image previous to the first image, nor to the next image after the last image. Opening additional images adds the images to the end of the sequence. The user can also clear all of the images from the sequence (using Clear from the File menu).

The images in the default directory are of Gros Morne National Park and Torngat Mountains National Park in Newfoundland and Labrador ( Newfoundland and Labrador Tourism).

Question 1: Implement ViewerModel and ViewerController

Implement the ViewerModel and ViewerController. The APIs for the various classes can be found here:

Starter code for each class:

Make sure that your program compiles and runs before you submit.

submit 1030Z L8 ViewerModel.java ViewerController.java