Java Swing AWT Question:

Explain the function of lightweight Components used in Swing?

Tweet Share WhatsApp

Answer:

Lightweight component allow the components to be dependent on the native group of other components. These components are simplified types that are used to display themselves on the screen and allow the result to be transparent from others. Each component in this renders itself using the graphics objects and the functions that are provided with it like: drawLine(), fillRect(). They render themselves on the heavyweight level component that they are used to be in. The libraries that are included in this involves: java.awt.Component or java.awt.Container classes. These classes are used to create lightweight components and it doesn't depend on the native group of components. It produce fast results and these components are memory-intensive that allows the user to create the look and feel of the application at run time. Swing component also allow modification to be done in the design easily.

Download Swing AWT PDF Read All 29 Swing AWT Questions
Previous QuestionNext Question
Explain the difference between swing and AWT?Why is Model-View-Controller Architecture used in Swing?