Quiz 11


With a piece of paper, write down your name and answers to the following questions.

  1. What method do you use to place a JMenuBar on a JFrame?

    1. setJMenuBar
    2. placeJMenuBar
    3. addJMenuBar
    4. insertJMenuBar
  2. What is the default selection mode for JList?

    1. single selection
    2. multiple selection
    3. single interval selection
    4. multiple interval selection
  3. Describe what the following program does.

    1. What is displayed in the window?

      The window it titled as “Quiz #11 Question #4”. The window contains a button with text “Button”.

    2. What happens when the button is pressed?

      When the button is clicked, a message window appears, centered on top of the main window. This popup window is titled as “Popup Message” and it contains a message “Hello World”.