Core Java Interview Questions and Answers for Freshers - 2

Question: 6

Name Components subclasses that support painting?

The Canvas,

Frame,

Panel and

Applet classes support painting.

Question: 7

What is the difference between the Font and FontMetrics classes?

The FontMetrics class is used to define implementation specific properties such as ascent and descent, of a Font object.

Question: 8

Which class is the immediate superclass of the Container class?

Component

Question: 9

Where the CardLayout is used?

CardLayout is used where we need to have a bunch of panel or frames one laying over another. It is replaced by TabbedPane in Swing.

Question: 10

What are the subclass of textcomponent class?

TextField and TextArea

Related Questions