Java in 21 Days (6th Edition) Day 14: Developing Swing Applications

The cover of Teach Yourself Java in 21 Days (6th Edition) by Rogers Cadenhead

Home Feedback Other Books Previous Day Next Day

Notes and Corrections

  • View the Certification Practice quiz solution
  • Certification answer: Answer (b) is correct. The application compiles successfully, but it does not display anything in the frame because nothing was added to the content pane. The slider should be added to the frame by calling pane.add(value) after the slider has been created.

    Answer (a) is incorrect. The application compiles but does not run correctly because it doesn't display the slider.

    Answer (c) is incorrect. The content pane is empty, but this does not prevent the application from compiling successfully.

    Answer (d) is incorrect. The new AskFrame() statement is correct. It calls the AskFrame constructor without assigning the object to a variable.

Source Files