Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Gridbaglayout Question

 
Amit Punjwani
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Question from javacaps mock exam
44. Which statements are true about GridBagLayout ?
A) Weight x and weight y should be 0.0 and 1.0 //??
B) If fill is both, anchor does not make sense. //true
C) It divides its territory in to an array of cells.
D) While constructing GridBagLayout , you won't tell how many rows and columns the underlying grid has.
Given ans : A, B, C
Regardng option A] I checked the API docs but nowhere does it mention that weightx and weighty value should be between 0.0 and 1.0 So I think A should be false
Comments please
Amit
 
Kishan Kumar
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amit,
Yes you are right, weightx and weighty should not be any
non-negative double value. it does not impose that they should
be between 0.0 and 1.0
If u take it in the right sense, these can be coded and i bet
you wont forget it for life when you see for yourself your results.
I expect the questions in this forum of to be of WHY type
rather than what is the output type. Everybody has a jdk compiler
and a notepad -);
I have just given a suggesstion and all out there please dont grudge me
!!!

------------------
Regards,
V. Kishan Kumar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic