HOMEWORK 1: Getting Acquainted with Java Swing

This is an INDIVIDUAL assignment.

Objective

In this homework assignment, we want you to become familiar with the basics of using Java Swing to create a GUI interface. Unlike in future assignments, where you'll be extending Swing to do new things, here you'll only be assembling already-provided Swing components to create a user interface.

Future assignments will build on this first assignment, so it's important for you to get this one right and to understand what you have done.

Description

During the course of this semester, we will be creating an interactive "digital notebook" application. When completed, the application will allow you to take notes (either through typing or with hand-drawn notes), and organize and view them in a variety of ways.

In this homework, we'll create the basic "shell" of the application. The goal of this homework is to simply give you some practice writing basic Swing GUIs (using existing components instead of creating your own), and to make sure that your environment is set up correctly.

Your application must create a new window (a JFrame component) when it starts. The components and behaviors that your application must provide in this window are:

Your application must behave reasonably when resized, moved, etc.

For all of the controls, selecting them should display a message in the status label describing what control was just activated.

This should not be a hard assignment. Again, the main goal is to ensure that you understand how to structure a basic Swing application, how to write callbacks, and how to respond to events such as windows appearing and disappearing (to change menu labels, for instance).

Deliverable

This is an INDIVIDUAL assignment; while you may ask others for help on Java or Swing details, pleaes build your application on your own.

Create a new directory using your last name as the name of the directory. Please compile your application and place both the sources and classfiles, as well as a README.txt file (described below) into this directory; ZIP this directory and mail it to BOTH me and the TA.

The README.txt file should contain your name and email address, the version of Java you used (either 1.4.x or 1.5.x, please) as well as any special info I might need in order to run your code. (Command line arguments, etc.)

Please take care to remove any platform dependencies, such as hardcoded Windows path names or dependence on a particular look-and-feel that may not exist on all platforms. Also, if you use any images in your application, please make sure that you include these in your ZIP file and that your code will refer to them and load them properly when from from inside the directory that's created when I unZIP your code.

Grading for this assignment, and future assignments, will roughly follow this breakdown:

Please let the TA or me know if you have any questions.