0% found this document useful (0 votes)
99 views8 pages

1.AWT Imp Questions

Here is AWT important mcq

Uploaded by

joshiprakash3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views8 pages

1.AWT Imp Questions

Here is AWT important mcq

Uploaded by

joshiprakash3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Java AWT Interview Questions Pdf

What is the difference between a Swing and AWT


components?
What are the different types of controls in AWT?
What is clipping?
What are the benefits of Swing over AWT?
What is the use of the window class?
What are AWT peers?
What are the component and container class?
What interface is extended by AWT event listener?
What is paint method?
What is the difference between a window and a frame?
What is the difference between choice and list?
What is the difference between Grid and
GridbagLayout?
What is a container in a GUI?
What is the default layout for Applet?
What are the types of checkboxes?
What is meant by Controls?
What is a layout manager?
Which containers use a Border layout as their default
layout?
What are the subclasses of the Container class?
Which method is method to set the layout of a
container?
Which containers use a FlowLayout as their default
layout?
Explain the use of update method?
Which component subclass s used for drawing and
painting?
Which container may contain a menu bar?
Java AWT Interview Questions and Answers Pdf
Question: 1

What is the difference between a Swing and AWT


components?
AWT components re heavy weight, whereas Swing components are lightweight.

Heavy weight components depend on the local windowing toolkit. For example, java.awt.Button
is a heavy weight component, when it is running on the Java platform for Unix platform, it maps
to a real Motif button.

Question: 2

What are the different types of controls in AWT?


The AWT supports the following types of controls:

Labels, Pushbuttons, Checkboxes, Choice lists, Lists, Scroll bars, Text components

These controls are subclasses of component

Question: 3

What is clipping?
Clipping is the process of confining paint operations to a limited area or shape.

Question: 4

What are the benefits of Swing over AWT?


Swing components are light weight.

We can have a pluggable look and feel feature which shows us how they appear in other
platforms.

We can add images to Swing components. We have toolbars and tooltips in Swing.
Question: 5

What is the use of the window class?


The window class can be used to create a plain, bare bones window that does not have a border
or menu.

The window class can also be used to display introduction or welcome screens.

Question: 6

What are AWT peers?


A component is associated with a standard AWT button object, a peer object and an interfacing
button object constructed per the native GUI.

Question: 7

What are the component and container class?


A component is a graphical object. A few examples of components are

Button

Canvas

Checkboc

Choice etc.

Question: 8

What interface is extended by AWT event listener?


The java.util.EventListener interface is extended by all the AWT event listeners.

Question: 9

What is paint method?


The AWT uses a Callback mechanism for painting which is the same for heavyweight and
lightweight components.

Question: 10

What is the difference between a window and a


frame?
The Frame class extends Window to define a main application window that can have a menu bar.
Java AWT Interview Questions for Freshers Pdf
Question: 11

What is the difference between choice and list?


A choice is displayed in a compact from that requires you to pull it down to see the list of
available choices and only one item may be selected from a choice.

A list may be displayed in such a way that several list items are visible and it supports the
selection of one or more list items.

Question: 12

What is the difference between Grid and


GridbagLayout?
In Grid layout the size of each grid is constant where as in GridbagLayout grid size can varied.

Question: 13

What is a container in a GUI?


A Container contains and arranges other components through the use of layout managers, which
use specific layout policies to determine where components should go as a function of the size of
the container.

Question: 14

What is the default layout for Applet?


The default layout manager for an Applet is FlowLayout, and the FlowLayout manager attempts
to honor the preferred size of any components.

Question: 15

What are the types of checkboxes?


Java supports two types of checkboxes. They are
Exclusive and Non exclusive

Exclusive: only one among a group of items can be selected at a time. If an item from the group
is selected, the checkbox currently checked is deselected and the new selection is highlighted.
The exclusive Checkboxes are also called as Radio buttons.

Non Exclusive checkboxes are not grouped together and each one can be selected of the other.

Question: 16

What is meant by Controls?


Controls are components that allow a user to interact with your application.

Question: 17

What is a layout manager?


A layout manager is an object that is used to organize components in a container.

Question: 18

Which containers use a Border layout as their default


layout?
Window, Frame and Dialog classes use a Border Layout as their layout.

Question: 19

What are the subclasses of the Container class?


The container class has three major subclasses. They are

Window,

Panel,

ScrollPane

Question: 20
Which method is method to set the layout of a
container?
setLayout ()

You might also like