




|
Custom Components
A custom component, such as an animated button, or specialized "control" is
easy to create in Java. Among the topics you need to fully understand:
-
Know what classes to extend
- Implement certain methods (such as paint() and update())
- Implement double buffering (if appropriate)
- Handle internal events
- Fire events
- Handling sizing issues
- Etc.
This section will discuss all of the issues and demonstrate a few custom components.
In addition, you'll create your own
custom components.
Objectives
-
Understand the difference between light-weight and heavy-weight components.
-
Know how to fire events using the AWTEventMulticaster
-
Know which classes to subclass
-
Become familiar with rendering issues, including z-order, fast drawing with
double-buffering, etc.
-
Override various methods of the Component class to make your custom component function
as a typical AWT Component.
Specifications
- Duration (total): 1 - 1.25 hours
- Duration of Exercises: 45 minutes
- Duration of Lecture: 30 minutes
Pre-requisites
If you are building a custom course, you will need to cover these topics before this topic can be presented:
In addition, material covered in this section requires attendees to know the following:
- An understanding of GUI Layout and basic components. You should be able to use the following:
- Layout managers - FlowLayout, BorderLayout, GridLayout
- Components - Button, TextArea, TextField, TextComponent, Label, and Menus
- Containers - Panel, Window, Frame, and Container
- The ability to nest layout managers
- Basic Java knowledge is assumed, including exception handling, threads,
full use of all the language constructs, and familiarity with the core Java 1.1 APIs.
-
Those without these pre-requisites should consider one of
our Ultimate Java Programming Workshops.
A table of contents of this module is available upon request.
Return to the Custom Order Page.
Copyright ©2007 by Petronio Technology Group, Inc. All
rights reserved. Petronio, "Targeted Technology Training", "T3"
and "Turning new technologies into your competitive advantage"
are trademarks of Petronio Technology Group. All other trademarks are the
properties of their respective companies.
|