Home | Articles

JFC Programming Quiz

By Monica Pawlan
April 1998
Back to Quiz

  1. Which APIs comprise the Java Foundation Classes (JFC)?

    Answer (C): Java 2D, Drag-and-Drop, Accessibility, and Swing Components.

  2. What are assistive technologies?

    Answer (C): Screen readers, screen magnifiers, and speech recognition systems.

  3. The Java Accessibility API defines a contract between individual user-interface components that make up a Java application and an assistive technology that provides access to that application. Which interface must all components that support the Accessibility API implement?

    Answer (B): Accessible. All components that support the Accessibility API must implement the Accessible interface.

  4. Which interface allows an assistive technology to determine and modify the currently selected components in a user interface?

    Answer (A): AccessibleSelection.

  5. Swing lets you develop lean and efficient GUI components with the look and feel you specify for your applications. Which look and feel looks the same on all platforms?

    Answer (C): Java look and feel.

  6. All Swing components inherit a generic border property that can be customized for various plain or decorative borders. There are border classes that provide beveled borders for buttons, labeled borders for panels, and borders that are just simple lines. Which one of the following is a standard Swing border?

    Answer (D): MatteBorder.

  7. Which Swing component lets you draw hierarchical data?

    Answer (A): JTree.

  8. Which Swing components are not lightweight?

    Answer (B): JWindow, JFrame, JDialog, and JApplet.

  9. Which statement is true?

    Answer (A): A lightweight component can have transparent pixels, and a heavyweight component is always opaque.

  10. Swing has which two kinds of classes?

    Answer (D): UI and non-UI classes.

You missed 0
Your score is 100 percent.

© 1994-2005 Sun Microsystems, Inc.