Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MindQ's Mock up Exam - q53

 
shinylee
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
53. A component that should resize vertically but not horizontally should be placed in a:
a) BorderLayout in the North or South location
b) FlowLayout as the first component
c) BorderLayout in the East or West location
d) BorderLayout in the Center location
e) GridLayout
The correct answer is c), but I think a) is the right one.
Am I right? Thanks!
 
J. Daniel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shinylee:
53. A component that should resize vertically but not horizontally should be placed in a:
a) BorderLayout in the North or South location
b) FlowLayout as the first component
c) BorderLayout in the East or West location
d) BorderLayout in the Center location
e) GridLayout
The correct answer is c), but I think a) is the right one.
Am I right? Thanks!


Reading through this question, it states that the component should resize its height (vertically) but not its width (horizontally). An object in North/South would resize its width when a window is resized to be wider, but its height remains constant. An object in East or West allows its height to change, but not its width. Thus, c is the correct answer. Best of luck to you on the exam!
-J
 
krishna kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Going through the Question..I thought C is the right answer.
In the BorderLayout The Height is Constraint in Noth and South. And Width is Constraint in East and West. so u cann't change the size horizontally for the Components added to East and West. So the answer is right.
U can try the following Program to get a clear Idea:
import java.awt.*;
class TestSize extends Frame
{
TestFlow()
{

add(new Button("One"),"East");
pack();
show();
}
public static void main(String s[])
{ new TestSize();}
}
All the best for the Exam...
------------------
Krishna Kumar R
CBSI,6 th Floor
B Towers
Airport Rd
Bangalore
U can reach me at yourskk@usa.net
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic