Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fill in the blanks..

 
boskey
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Suma.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell me the mock exam's URL?
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic