hardcopy due in class: 2.45PM
due Thu Nov 21, by 6AM -- electronic submission
The goals of this assignment are to:
- implement an applet
- build a graphical user interface
- learn how to use Java graphics
You need to modify the GUI example from class as follows:
- include at least 4 of the following GUI components:
Button, Checkbox, Choice, Label, List, TextArea, TextField
- additionally, you must include a Canvas
- at least 2 of the components must be attached to some type of
behavior in the applet and you must handle events using a listener interface
(i.e., clicking on a button must do something visible in the applet)
- use any layout manager except FlowLayout (BorderLayout is fine)
- include at least 5 of the following AWT drawing primitives in the
Canvas: drawString, drawLine, drawRect, drawOval, drawArc, fillRect,
- be CREATIVE!!!
The working applets will be posted in a gallery on the class web page.
Your assignment will consist of:
- a class that extends an Applet,
in a file named hw5<yourCUNIXusername>.java
- an HTML file that invokes the Applet,
in a file named hw5<yourCUNIXusername>.html
- You may include additional class files, if necessary, named
whatever you want --- but the Applet has to be in the
You can use the examples from class as the basis for your assignment,
but you MUST change the example(s) significantly in terms of the
components used and the drawing done.
Your source code (i.e., your
.java file) but be
neat and clearly commented.
You must have a header comment and you should comment the end of each
block (i.e., each
You need to comment each method that you write within each class.
Follow the submission instructions carefully!!!
If you don't, human intervention will be required to fix your
mistakes, and you will lose 1 point.
- Name your homework files properly.
You will submit (at least) 2 files:
For example, mine is called hw5eis2003.java.
For example, mine is called hw5eis2003.html.
- Submit your files electronically.
You need to turn in ALL the Java source code,
Follow instructions on the assignments page.
- Turn in a harcopy of your program during THE FIRST 5 MINUTES OF class.
Print out the homework template cover page
(http://www.columbia.edu/~cs1007/hw-template.html) and fill it out.
Staple the cover page to a hardcopy (print-out) of your program.
You need to turn in ALL the Java source code and the HTML file.
Make sure your name is on all the papers you hand in!
Bring the cover page and hardcopy to class on the day the assignment
is due and deposit it in the homework box at the front of the
classroom within the first 5 minutes of the class.
This assignment is worth 10 points (out of 100 for the semester).
Distribution of points is:
- 1 point for following submission instructions (i.e., no human
- 1 point for commenting source code as described above and
using a clear programming style (i.e., indenting code consistently,
using meaningful variable names, etc.)
- 1 point for submitting a working applet and accompanying HTML file
- 2 points for including the 5 GUI components (Canvas plus 4 others,
0.4 points each)
- 1 points for including the 5 drawing primitives (0.2 points each)
- 2 points for implementing 2 behaviors (1 point each)
- 1 points for using a layout manager
- 1 points for creativity