Beruflich Dokumente
Kultur Dokumente
As you can see, the class Component is a subclass of the class Object, which
declares many attributes and behaviours common to the GUI components in
package java.awt and javax.swing.
The class Component implements some useful public methods, which are inherited
by its subclasses, such as:
public void setSize(int width, int height) used to set the size of a
component
public void setBackground(Color c) - used to set the background color of a
component
public void setVisible(boolean b) - used to set the visibility of a component
(i.e. to make a component appear/display component on the screen)