Web site builder - Java Swing O Reilly public void removeNotify() Called

Java Swing O Reilly public void removeNotify() Called by Swing to notify the component that it has lost a parent. The method fires a notification to all AncestorListeners, informing them that the parent component is no longer an ancestor. removeNotify() also fires a property change event indicating that the “ancestor”property has changed. public void scrollRectToVisible(Rectangle aRect) Calls similar methods up the component hierarchy. You can override this method at any level if you want to explicitly handle scrolling updates. public static boolean isLightweightComponent(Component c) A convenience method that returns a boolean indicating whether the component passed is a lightweight component. If it is, the method returns true. Otherwise, it returns false. This method may move to java.awt.Component in the future. Chapter 4. Labels and Icons We’ll begin our look at the Swing components with the JLabel class. In addition, we’ll look at Swing’s new Icon interface and an implementation of this interface called ImageIcon. With just these few new constructs, you’ll begin to see how much Swing has done to improve UI development in Java. 4.1 Labels Swing allows you to create labels that can contain text, images, or both. We’ll begin this chapter with a look at the JLabel class. 4.1.1 The JLabel Class The JLabel class allows you to add basic, nonfunctional labels to a user interface. Because of their inherent simplicity, there is no model class for JLabel components. Figure 4.1 shows a class diagram for JLabel. We’ll get into the two relations to Icon a little later. Figure 4.1. JLabel class diagram - 74 -
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision ecommerce web hosting services

Leave a Reply