creates a calendar database, with a single String for each day of an entire year. Events area added by making the string longer.
At the beginning, [Make Year] creates all the dates for an entire year. It must keep track of the days of the week, as well as the correct number of days in each month.
The user adds new events by typing the description in the Event TextField, and then clicking on a date. For recurring events (e.g. meetings, sports practice, etc) the user clicks on several dates.
The dates can be saved and loaded in a text-file named "Dates.txt".
The Dates class extends EasyApp. The EasyApp class contains two sets of useful methods:
There is an add.. method for each normal AWT component:
Button, TextField, TextArea, Label, List, Choice, Checkbox
EasyApp uses a null Layout manager, so each component is placed and sized directly in the add.. method. Some methods require a String as the first component - this will be displayed by the component. They all end with the four parameters left, top, width, height.
The add.. methods also execute and addListener(this) command, so the control actions are automatically connected to the actionPerformed and itemStateChanged methods. The application must override these event handlers.
The basic structure of an EasyApp program is contains the following sections:
The use of a null layout manager reduces cross-platform flexibility, as standard font sizes are not the same in variaous OS's. However, the direct control of the placement of components is probably a simpler concept for beginning programmers.
All the components are standard AWT components. All standard methods function as normal, including adding further listeners.
Using EasyApp is not significantly different than using a GUI IDE like NetBeans, but in EasyApp the students must do a bit more work, and will hopefully learn a bit more.