aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Fill in the blanks.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Fill in the blanks.." Watch "Fill in the blanks.." New topic
Author

Fill in the blanks..

boskey
Greenhorn

Joined: May 30, 2000
Posts: 10
This question is from Khalid's mock test.
Can anybody tell me the correct answer...
Write a line of code that declares a variable named layout of type LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid of equal-sized rectangles, 3 components wide and 2 components high.
Suma Narayan
Ranch Hand

Joined: Apr 03, 2000
Posts: 136
boskey,
The line of code is
LayoutManager layout = new GridLayout(2,3);
Write a line of code that declares a variable named layout of type LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid of equal-sized rectangles, 3 components wide and 2 components high.

The line of code is
LayoutManager layout = new GridLayout(2,3);
1. Here layout is of type LayoutManager. LayoutManager is an
interface implemented by GridLayout.
2. layout is initialized with new object
3. GridLayout(2,3) will layout the components in a rectangular
grid of equal-sized rectangles, 3 components wide(columns)
and 2 components high(rows).
I hope this helps.
Suma.

[This message has been edited by Suma Narayan (edited June 07, 2000).]
boskey
Greenhorn

Joined: May 30, 2000
Posts: 10
Thanks Suma.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Can you tell me the mock exam's URL?
Thanks!
 
 
subject: Fill in the blanks..