1) Which of the following is able to display RTF files?
2) What is the name in Java, of the component that is used to
represent sub-sections
of a document?
a) Blocks
b) Paragraphs
c)
Elements
d)
Lines
( c )
a) BoxLayout
b) FlowLayout
c) GridLayout
d)
CardLayout
( d )
4) True or False. Absolute x-y coordinate based layouts are possible
using the
NullLayout
manager.
( False )
// The
layout is set to null as in setLayout( null )
5) Which of the following statements regarding BorderLayout is least correct?
a) Any region that is left out will be filled by the CENTER region
if
the CENTER
region is added.
b) Using the getContentPane( ).add( ) with a component and not
specifying
a region
will by default add to the center.
c) If a second components is added to a region where another component
is already
resident, the second component added is ignored.
d) BorderLayout has the constants, NORTH, SOUTH and
CENTER. ( c )
// The
last component added will be visible
6) Which of the following layouts is a swing layout rather than an
awt
layout?
a) GridBagLayout
b) CardLayout
c) BoxLayout
d) CardLayout
7) Which of the following statements is not correct?
a) GridLayout will adjust the number of columns depending on the
number
of
components added to the grid.
b) GridLayout allows components to retain their preferred size and
shape.
c) GridLayout is used to create rows and columns in uniform grid
d) GridLayout is one of the awt layout
managers.
( b )
// Grid
makes components fill the rectangle defined by the grid