Comp 152 Project 4 : GUI
Due: April 3rd (Mon/Wed class) or
April 4th(T/Th class) at 11:55pm
Objectives: Build a GUI/work with
GUI components, respond to events, and appreciate the need for comment by
looking back at your older projects.
Project:
You will make a simple GUI application which reads information from a
file, responds to events and displays the data from the file.
Specifics:
- Have your program load Proj4SampleData.txt
into the program. You can make it a class like in your first two
projects or you could make it an ArrayList of string arrays or something
of you like. (Note for simplicity I recommend that you treat each piece
of data as a string - even the GPA data. Note that each field of the
data is separated by a comma. I suggest you look back at how you
read the data in for your earlier projects to help with this one.
- Build a GUI for your project such as the sample that I built above.
Yours doesn't have to look just like mine, but it needs to be
attractive* and contain at least
- a JList with all of the student first and last names (and only the
first and last names - no more data)
- A label for the JList telling users that it is a list of students
- three editable fields - one for first name, one for last name and
one for GPA
- each of these fields should be labeled.
- one non-editable field for the BannerID
- this field should also be labled.
- put your name on the title bar of the window (I didn't do this for
mine since there is only one instructor)
- Your GUI must respond to selection events in the JList so that when
the user selects an item from the list, the data for the student is
automatically placed into each of the four fields.
*attractive will be defined as making sense in a user interface - there
shouldn't be large blank spaces in your application, nor should things be so
cramped that I can't use your window.
Extra requirements for the project
- Comment your code.
- No method can be more than 25 lines of code long (comments, braces on
a line all by themselves and blank lines don't count)
- You can have no more than three lines in your main method.
- Include a readme.txt with your project telling me
- your name
- Anything you didn't get done
Submission:
Zip up your project into a single zip file
Submit using Moodle as before.