CS 3744, Midterm Project -
Due March 23, 2010
GUI Framework
GUI programming is based on an existing GUI framework that provides necessary
components and services to build a graphical user interface. A framework is a
cohesive set of interfaces and classes that collaborate to provide services for
the core, unvarying part of a logical subsystem. It contains concrete (and
especially) abstract classes that define interfaces to conform to, object
interactions to participate in, and other invariants. The examples of such
frameworks include Java Swing, GLUI, Qt and X11 Motif Widget Set. The purpose of
this project is to get a better understanding of how such a framework works and
to design and implement a small GUI framework that will be used to implement the
final project.
Project Tasks
The Midterm project builds on homework assignments 4 and 5 and has the following components:
- Complete implementation of event related classes (mainly key event related).
- Provide support for focus (where the key events go) by remembering the coordinates of
the last mouse click event.
- Implement VTTextField, a text component that allows for the editing of a single line of text.
It generates a VTActionEvent when the RETURN key is pressed.
- If VTButton has the focus and receives the RETURN key, it will generate a VTActionEvent.
- This time you create the main (tester) class MidtermProject.java. The tester class should
clearly demonstrate all the functionality implemented. You can use HomeworkFive.java as a
starting point.
VTTextField Implementation
- You are responsible for API specifications.
- You decide what fields, methods, and constructors are needed.
- It has to fit in the existing framework provided in the reference code for Homework Five.
- Follow practices and conventions described and used in lectures.
- Consult the Java API for the corresponding AWT/Swing components.
Partners
The class project must be done individually.
Submission
Submit a single .jar file named <pid>p1.jar, where <pid> is your VT pid, lower case.
The .jar file should contain all the .java files (in the corresponding folders) in the cs3744
package (MidtermProject.java), cs3744.gui package, and cs3744.gui.event package. You must
use javadoc comments to document your code (all public components). Submit your
program by 11:59pm the day it is due (March 23, 2010). Late projects lose credit as
specified in the course syllabus. The explanations of how it all works should be included
in your code documentation.
Grading
- Javadoc documentation
- Tester class MidtermProject.java
- Text field class VTTextField.java
- Key event class VTKeyEvent.java
- Updated button class VTButton.java (support for key events and reaction to the RETURN key)
- Support for text focus
- Overall implementation and stability.