Java Swing AWT Question:

What is the use of JComponent Class in Swing?

Tweet Share WhatsApp

Answer:

Jcomponent is used as an abstract class that extends the functionality of the swing components. It allows the common swing component library to get involved in providing the functionality and the visual appearance that is required. The class that serves this purpose is given as: java.awt.Component class. This class also provides the framework for AWT components as well. The other class javax.swing.JComponent provides the role that is identical to other classes for the Swing components. JComponent class extends the class java.awt.Container that itself extend another class of java.awt.Component. This allows the AWT functionality to be used and added while writing the code for a program that needs to be executed. Jcomponents uses the swing component and allow the containers to handle the request for all the components like add() the component in the container, etc.

Download Swing AWT PDF Read All 29 Swing AWT Questions
Previous QuestionNext Question
What is the use of double buffering in swings?What is the function of Abstract Action class?