Which of the following is a difference between lightweight a

Which of the following is a difference between lightweight and heavyweight components.

Lightweight components render themselves using paint, but heavyweight components render themselves using paintComponent.

Lightweight components render themselves using paintComponent, but heavyweight components render themselves using paint.

Lightweight components can’t contain other components, but heavyweight components can.

Lightweight components can’t have layout managers, but heavyweight components can.

Solution

Answer:

Lightweight components render themselves using paintComponent, but heavyweight components render themselves using paint.

Swing components are lightweight components and AWT components are heavy weight components.

Swing components render themselves. Swing components are called lightweight because they do not have any dependency with the underlying windowing system

Which of the following is a difference between lightweight and heavyweight components. Lightweight components render themselves using paint, but heavyweight com

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site