Multiple choice

A J Menu Bar cannot be added directly to a ____.

  1. content pane

  2. form

  3. applet

  4. frame

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In Java Swing, a JMenuBar is designed to be added to a JFrame using the setJMenuBar method, not directly to components like content panes or applets.