MORE ABOUT THE EXAMPLE
By extending Frame , the MyFrame code gets access
to a bunch of cool variables and functions related to its appearance and
behavior. Here's a short list:
- Background color
- Foreground (text) color
- Screen position and size
- Default font used by the label
- Whether or not the user can resize the window
- How the mouse cursor appears when it is over the window
- The icon that shows up on the tool bar when the window is minimized
You could build up a user interface by adding GUI elements created from
classes in the java.awt library. Here are some of the elements
you could create:
- Labeled push-buttons
- Checkboxes or radio buttons
- Scrollbars
- Text entry boxes or areas
- Drop-down selection lists
- Images
- A menu bar with drop-down menus
Moving On
This lesson introduced you to a very important group of programming languages that got started with C. After a quick look at a program in the most primitive of this group, you made a start on the features of OOP with emphasis on programs for graphic user interfaces.
In the next lesson, you temporarily leave OOP to look at the markup languages HTML and XML. Don't worry; later lessons tie all these strands together. Before you move on, be sure to complete the assignment and quiz for this lesson. And don't forget to drop by the Message Board to see what your fellow students have to say.
