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.
PLEASE NOTE: You are NOT allowed to use any type of GUI builder tool for this assignment (anything that allows you to graphically lay out an interface and then generate code for it). The reason is that this assignment is designed to get you up-to-speed on swing through writing some basic Swing code; if you're using a GUI builder, you're not getting that practice.
There are some videos of the Courier prototype in action here and here.
(The first of these demonstrates more of the functionality that will be relevant for the class project.)
While we obviously won't be building custom two-screen hardware for the project, we will create a passable replica of Courier's functionality that can run on a laptop of other standard computer.
Please note that this will be a continuing assignment that we'll build on in successive parts throughout the semester. Because of this, its important to not fall behind on any part of the project!
In this first homework, we'll create the basic "shell" of the application, using existing off-the-shelf Swing components. You'll get experience with working with the component hierarchy, doing layout, and wiring up callback functions.
Your application will create a new window (a JFrame component) when it starts. Inside this window will be two main areas:
1. On the left, an area for computer-generated content. In the Courier demo videos, this area contains things like address books, web browsers, and photo browsers.
For this assignment, you should create this region as a JTabbedPane containing tabs for a number of different components that present computer-generated content. At a minimum, you should provide two tabs that include:
2. On the right, an area for user-generated content. In the Courier videos, this area is used for free-form user-created digital ink, and can also contain information dragged over from the left side of the application.
For now, you can just create an empty JPanel for this region of the application; in the next assignment, we'll create a custom component that allows for digital ink and other functionality. Below this JPanel (that is, in a horizontal strip along the bottom of the right-side user content area) should be the following:
Along the bottom of the entire application should be a status bar (a JLabel or JTextField) that you can use for status messages (for example, which page the user is currently on, in later iterations of the assignment).
Your application must be resizable, and must behave reasonably when resized, moved, etc. "Reasonable resizing" means that the application should have a minimum size that's small, but large enough to display all of the control components (buttons, etc.). The user should be also able to enlarge the application to arbitrary sizes. When the application grows or shrinks, there shouldn't be any big "gaps" of whitespace; in other words, all the pieces of your app should look nice, grow to fill available space, and not arbitrarily re-layout as the application is resized.
This should not be a terribly hard assignment. Again, the main goal is to ensure that you understand how to structure a basic Swing application, how to use a range of components, how to write callbacks, and how to respond to events.
Some possibilities for this assignment are:
Here are the details for how to turn in the assignment. We'll be using this structure for all of the turn-ins:
1. Create an executable JAR file named courier.jar that contains your runnable application. (See here for details on how to create executable JAR files.) We should be able to run your program by typing "java -jar courier.jar" on the command line; please be sure that your application runs correctly using ONLY this command, and that it doesn't require any additional CLASSPATH or other environment variables, no additional parameters, no classfiles or images located outside the JAR file, etc.
2. Create a new directory using your last name as the name of the directory.
3. Put the courier.jar file into the top level of this directory, and all of your source files into a "source" subdirectory inside this directory.
4. Put a README.txt file into the top level of this directory. This file should contain your name and email address, the version of Java you used (Java 1.6.x only, please) as well as any special info we might need to know about your program (let us know if you did extra credit, for example).
5. ZIP this directory and submit via T-Square (instructions are here).
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 JAR file and that your code will refer to them and load them properly when they're in this JAR file (see this page for some details on how to include and load images from within a JAR file).
Grading for this assignment, and future assignments, will roughly follow this breakdown: