![]() ![]() The emphasis of MDE on using domain-specific languages has caused a proliferation of meta-models, many of them capturing variants of base languages. Although a common use of the AWT is in applets, it is also used to create stand-alone windows that run in a GUI environment, such as Windows.Model transformations enable automation in Model-Driven Engineering (MDE) and are key to its success. Chapter 25 examines the AWT’s imaging subsystem and animation. It also explains further aspects of Java’s event handling mechanism. Chapter 24 describes the various controls, such as scroll bars and push buttons, supported by the AWT. ![]() In this chapter, you will learn how to create and manage windows, manage fonts, output text, and utilize graphics. You will also be ready to move on to Swing. From there, you will be able to explore other parts of the AWT on your own. However, this and the following two chapters explain the basic techniques needed to use the AWT effectively when creating your own applets or stand-alone GUI-based applications. Therefore, it is not possible to describe in detail every AWT class, method, or instance variable. The AWT is quite large and a full description would easily fill an entire book. ![]() It is also the foundation upon which Swing is built. The AWT contains Tnumerous classes and methods that allow you to create and manage windows. This chapter begins its in-depth examination. They also allow you to create more efficient code.Ģ3 Introducing the AWT: Working with Windows, Graphics, and Text he Abstract Window Toolkit (AWT) was introduced in Chapter 21, where it was used in several example applets. As just illustrated, both named and anonymous inner classes solve some annoying problems in a simple yet effective way. Therefore, it can call the showStatus( ) method directly. Because this anonymous inner class is defined within the scope of AnonymousInnerClassDemo, it has access to all of the variables and methods within the scope of that class. This new class is not named, but it is automatically instantiated when this expression is executed. Furthermore, that class extends MouseAdapter. public void paint(Graphics g) indicates to the compiler that the code between the braces defines an anonymous inner class. = ke.getKe圜har() repaint() } // Display keystrokes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |