The right-hand region displays the current color, which is a combination of the red, green, and blue levels the user selects. The user specifies the amount blue by clicking on the proper location in the bar. The middle region displays a vertical bar of blue. ![]() The user selects red and green levels by clicking in this swatch. The ColorPicker interfaceĪs you can see in the figure below, the ColorPicker component consists of three regions: The left-hand region displays a swatch of colors, with the red level varying from left to right across the swatch and the green level varying from top to bottom. My goal is to show you how to acquire, process, and dispatch events, without getting bogged down by the complicated color selection details. To keep things simple, we're going to look at a fairly basic example. Those with an eye to the future should make an effort to be aware of the additional changes JDK 1.2 will bring, but that's another story. The concepts we cover also will be helpful when you need to update existing custom components to work within the new event model. Over the next few virtual pages, we'll step through the how-tos of building reusable AWT components that operate within the new event delegation model. This move introduces significant changes to the Abstract Windowing Toolkit (AWT), some of which we'll address in this article. Although many applications currently require JDK 1.0.2, a transition to 1.1 is inevitable for any serious development efforts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |