A component is a fundamental user interface object in Java and must be inside a container in order to be used. The container will group components and arrange them using the layout manager. All Swing components are derived from the javax.swing.JComponent class. This class is the root of the Swing component hierarchy, but descends from the AWT container class, making Swing a derivative of AWT.
The functionality of the JComponent class is appearance and behavior. Methods and variables exist within the class to control the general appearance of an object, such as visibility, current size and location, and common graphical defaults. A component is associated with a particular display device when it is first displayed. The access to the display area is encapsulated by the JComponent class on the device; providing tools for rendering graphics, working with off-screen resources, and receiving user input.
for more information about java swing and to be well prepared for your SCJA exam – sign up for the SCJA exam preparation course:
**For Instant Access, follow these simple steps
- Go here
- After payment is confirmed you can download your enrolment procedure
- Choose your username and password and create your account
- Confirm your registration, log in and you’re ready to start your exam preparation course **