CIS3931 Intro to JAVA Programming
Assignment #4 – GUI Shell for a simple text editor
Overview
For this assignment, you will be creating a “shell” or “skeleton” of a notepad-like text editor using the GUI classes in JAVA.
Details
This program will be created using the methods discussed in the 22-June-05 lecture class. You will be creating a JEditorPane that is scrollable. This JEditorPane will have a JMenuBar that contains the following JMenus : File, Edit, Font, Background Color, and Text Color. Each JMenu will have the JMenuItems outlined below :
The “File” JMenu should have : New, Open, Save, Quit
The “Edit” JMenu should have : Cut, Copy, Paste, Select All
The “Font” JMenu should have : Name, Size, and Style
The “Background Color” and “Text Color” menus will be empty for now.
Your text editor should close and exit the program when the “close” (“X”) button is pressed at the top right corner of the screen.
Your text editor should look like the following example :
Example of text editor with the “File” menu expanded (ignore the “alt-n” next to the word “New”) :
The example shows a window called “Small Text Editor”. For your program, the window title should be your last name followed by the works “editor skeleton”. For example, my title would be “Thornton editor skeleton”.
Program Flow
This program doesn’t produce any interactive output. There is no logical program flow that needs discussed. You are only required to create the skeleton GUI as described above.
Actual Program Output
Your program should look like the example pictures above.
Grading
5 points – Name, date, and assignment number on top of program
20 points – Proper commenting
15 Points – Programming style
60 Points – Program has all of the elements listed in the description
Total : 100 points
Extra Credit Opportunities
There is no extra credit available for this program. There will be extra credit opportunities when this program is turned into a full text editor for Assignment 5.
Grading explanation
Name, date, assignment number
Your program should have the following header format
/*
Name : {YOUR NAME HERE}
Date : {PROGRAM SUBMISSION DATE}
Assignment : {ASSIGNMENT NUMBER AND TITLE}
*/
Proper commenting
Your program should be properly commented. This means that a person who is unfamiliar with the JAVA programming language should be able to understand what each line/section of your code is doing by simply reading your comments. There is no such thing as too much commenting, so feel free to comment as much as you want.
Programming style
This is a catch “all” for many things. Your program should be indented correctly. The code should be easy for the grader to read. You should optimize your code so that you are meeting the objectives in as little lines of code as possible. You should attempt to use the most advanced programming technique possible to complete the objective. For example, use loops instead of manually repeated the same block of code. Your variable names should be clear and concise.
Program has all of the elements listed in the description
Please be sure to read the details section very carefully to be sure that you have all of the required elements.
Program due date and submission instructions
This program is due no later than Thursday, 30th June, 05.
The program should be named Assignment4YOURFULLNAME.java
(Example : Assignment4RobertThornton.java)
You are to submit your source code (your .java file) to cis3931 at cs dot fsu dot edu
For assignment clarifications, please e-mail thornton at psy dot fsu dot edu
For help with your program, please e-mail cis3931 at cs dot fsu dot edu