This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Mock Exam Errata and the fly likes Jxam Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Jxam Question" Watch "Jxam Question" New topic
Author

Jxam Question

Vipin Dube
Greenhorn

Joined: Feb 02, 2001
Posts: 5
I am sending one question from Jxam exam simulators
Q . We have created a Frame which is initialy invisible, by using which of the following method we can make the frame visible (select one or more)
a. setBounds()
b. setSize()
c. setVisible()
d. show()
Please, answer the above question with explanation.
Ans. according to Jxam is a,b,c.
Sai Ram9
Greenhorn

Joined: Feb 13, 2001
Posts: 18
Hi vipin,
initially u set the bounds of a frame by calling setBounds(),
Then u set the size of the frame by calling setSize().
Then u make it visible by calling setVisible().
u can make the frame visible only if u have set the bounds and the size, if u do not specify them its not use in just making the frame visible which has not set its size.
Hope this Helps!
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi,
The question needs to be reworded to arrive at the solution that the author gets to! New question:
We have created a Frame which is initially invisible. Which of the following methods could be combined to make the frame visible?
Sai is correct in the sense that you need to use more than one command to get the frame visible. The technically correct answer would be that a program could perform the following two steps:
a and then c, or
b and then c.
Since the setBounds method requires x, y, width, and height, it would be redundant to then call setSize because you just set the size already! On the other hand, you can just call setSize because the window system will supply x and y values for you (usually zeros ...).
Regards,
Manfred.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jxam Question
 
Similar Threads
jxam
Jxam
Jxam
Jxam
JXAM