Windows fundamentals in java
It includes all the components those are displayed on the screen and it also defines various types of public methods for managing events such as mouse and keyboard window etc. It is subclass of components which Inherits the various Properties from that Class and it provides to laying out the component , that are contains by using the various layout managers.
Means how the Components will be displayed in the applet and in which Manner the Components will be displayed in the window. The various Methods those are Contained in the Container class are :. It is a subclass of container and it is the super class of Applet. It is a window that does not have a title bar menu bar or border. Window is also a Sub Class of a Container and window class creates a top level window.
These are not directly created, for this the subclass of window name frame is used and dialogs are used. Resizing corners and it is a subclass of window class when we creates A frame object within a applet , will display a warning message that a frame window is created by an applet not by any software.
But when a frame window is created by a program other than an applet then a normal window is created. An instance of frame can be created using any of the above discussed constructors. You can use the frame objects unique methods as well as its inherited method by specifying the frame object name with the method name.
A Component object is responsible for remembering the current foreground and background colors and the currently selected text font. The Container class is a subclass of Component.
It has additional methods that allow other Component objects to be nested within it. Other Container objects can be stored inside of a Container since they are themselves instances of Component. This makes for a multileveled containment system. A container is responsible for laying out that is, positioning any components that it contains. It does this through the use of various layout managers, which you will learn about in Chapter The Panel class is a concrete subclass of Container.
A Panel may be thought of as a recursively nestable, concrete screen component. Panel is the superclass for Applet. When screen output is directed to an applet, it is drawn on the surface of a Panel object. In essence, a Panel is a window that does not contain a title bar, menu bar, or border.
When you run an applet using an applet viewer, the applet viewer provides the title and border. Other components can be added to a Panel object by its add method inherited from Container. Once these components have been added, you can position and resize them manually using the setLocation , setSize , setPreferredSize , or setBounds methods defined by Component.
The Panel class is a concrete subclass of Container. Panel is the superclass for Applet. When screen output is directed to an applet, it is drawn on the surface of a Panel object. APanel is a window that does not contain a title bar, menu bar, or border. When you run an applet using an applet viewer, the applet viewer provides the title and border. Other components can be added to a Panel object by its add method inherited from Container. Once these components have been added, you can position and resize them manually using the setLocation , setSize , or setBounds methods defined by Component.
The Window class creates a top-level window. A top-level window is not contained within any other object; it sits directly on the desktop.
0コメント