|
[Help | API Docs | Short Course | Magercises] For this magercise, you will create the GUI for a small Personal Information Manager (PIM). This tool has three components:
The provided skeleton code has the necessary event handling structures in place; you'll just need to fill in the code inside the event-handling setup. Do not concern yourself with the event-handling mechanism; just fill in the requested code. To start, run the demonstration. Watch for the following things:
Magercise 4 Prerequisites
None.Skeleton Code
MiniPIM.java Tasks:
Annotate your picture with the expansion behavior. Define how you think the GUI should expand and contract when the window size changes.
Starting with the skeleton code provided,
define the three selection buttons at the top of the GUI and a
For these selection buttons, use the buttons already defined and created
in the skeleton. They are predefined so the included event handlers have
something to attach to.
You are doing this to get your initial
When finished, compile and test your code to see if it looks right
Fill in the
When finished, compile and test your code to see if the buttons switch labels.
Define the menus and menu items. Do not worry about enabling and disabling
them yet.
At this point, just compile and check to see that they appear properly.
Set the enable/disable behavior of the menu items. Initially, the
Open, Save and Save As items should be disabled,
as they do not apply to the calculator sub-GUI. All others should be enabled.
Add code to the event handlers that switch between sub-GUIs to enable and
disable those three options as necessary.
Compile and test your program.
Replace the NotePad label with a
Compile and test your program.
Define the To-Do List GUI.
This GUI should contain a
Replace the To-Do List label with this new sub-GUI.
Compile and test your program. This GUI should a label for its display and a keypad of calulator keys.
Note that the example changed the foreground color, background color, and
font of the Replace the Calculator label with this new sub-GUI. Compile and test your program. Where help exists, the task numbers above are linked to the step-by-step help page. Solution Source minipim/MiniPIM.java Demonstration Demonstration Copyright © 1998-1999 MageLang Institute. All Rights Reserved. | ||||
|
| ||||||||||||