• Post Reply Bookmark Topic Watch Topic
  • New Topic

actual GUI question on a job technical interview

 
Kevin Thompson
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was asked this question in a technical job interview. The possible answers were:
a) only the "third" button is displayed
b) Three buttons are displayed across a window.
c) A runtime exception is generated (no layout manager)
d) Only the "first" button is displayed
e) only the "second" button is displayed

Of course, as is the case with lots of technical interview questions - I think the question is jibberish and NONE of the answers are correct.
Does anybody here have any thoughts about this?

 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually there is a correct answer A. This question tests your knowledge of 2 things.
1. The default layout for Frame (BorderLayout)
2. The default behavior of the add method. In BorderLayout case, it is to place the component in the center and only 1 component can be in each section of BorderLayout. Last in wins.
 
Aaron Roberts
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would have failed, as I forgot the default layout was Border. I thought it was Flow, which is for Panels.
Sneaky question!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!