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

R&H test question on Frames

 
Kamakshi Mahadevan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To make a frame f appear on the screen, you have to call:
a)f.setSize(300,200)
b)f.setVisible(true)
c)f.setForeground(Color.white)
d)f.setFont(new Font("Sans Serif", Font.BOLD,24)
The answer is: a & b
when i tried a program with setVisible(true) and no setSize(), it still displays a frame with just the title bar & the 3 buttons for minimize, maximize & close. When I click on the maximize button, the frame occupies the entire screen.so the frame appears on the screen with no setSize().
So, I think the answer is b.
i saw a similar question in Jxam.
can anybody tell me if I am missing something here??
thanks
kamakshi

 
Nijeesh Balan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kamakshi,
Even I would support your point..I answered B but later found the answer to be A and B..
Others please do clarify...
Thanks
Nijeesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic