TAILIEUCHUNG - Java Programming for absolute beginner- P12

Java Programming for absolute beginner- P12:Hello and welcome to Java Programming for the Absolute Beginner. You probably already have a good understanding of how to use your computer. These days it’s hard to find someone who doesn’t, given the importance of computers in today’s world. Learning to control your computer intimately is what will separate you from the pack! By reading this book, you learn how to accomplish just that through the magic of programming. | 2 25 03 8 52 AM Page 178 k 0 c c 0 2 V Using Frames The Frame class is a GUI component that defines a top-level window. A Frame includes a border and a title bar. The Frame class extends the Window class which is a top-level window without a border or title bar. The Window class subclasses the Container class which is a component that can contain other components. Because Frame inherits from these other classes it is itself a container able to hold other components. Table summarizes some of the Frame class s methods. Remember also that Frame inherits from the Component class so the methods shown in Table are also present in the Frame class. 0 a c E E s k a o k a s s The UselessFrame Application The UselessFrame class extends the Frame class and doesn t do much except set its size and display it. To write this application first you must import the Frame class import Then you declare the UselessFrame class and indicate that it is a subclass of the Frame class public class UselessFrame extends Frame Table Summary of Frame Methods f A Method Description Frame Constructs a new Frame that is initially not visible. Frame String Constructs a new invisible Frame with the given String title. Image getIconImage Returns this Frame s icon Image object. MenuBar getMenuBar Returns this Frame s MenuBar. String getTitle Returns this Frame s String title. boolean isResizeable Returns a boolean that indicates whether this Frame can be resized by the users. setIconImage Image Sets the Frame s icon image to the given Image object. setMenuBar MenuBar Sets this Frame s menu bar to the given MenuBar object. setResizeable boolean Determines whether this Frame can be resized. setTitle String Sets this Frame s title to the given String. setVisible boolean Makes this Frame visible if the given parameter is true. If it is false it makes the Frame invisible. J team Line - live informative Non-cost and Genuine Please purchase PDF Split-Merge on .