Brief Review from Last Class






Recall that last time, we

Drew stick figures on a canvas using methods like We added the stick figure canvas to the center of a Frame using the Border Layout manager and the Frame add() method.

Next we added a single button to a window Frame.

Next we looked at check box components from the class Checkbox and radio components (only one can be checked/depressed at a time) that are check boxes that are collected together in a check box group (class CheckboxGroup).

We used Panels to group components into a larger component for a portion of the screen. For example, to display a tool bar one might use a panel with the FlowLayout manager and place it on the top of the screen with the BorderLayout manager.

We also saw example of text field components (class TextField).

We showed how to handle events, like mouse clicks, via the method handleEvent() that is used in JDK 1.0 to respond to a whole range of different kinds of events. See the source code for the class Event to see a listing of all the possible events.

We then used the event handling, a button, and text fields to create a Frame that counted all the mouse clicks on the button and all the clicks that missed the button.