Multiple choice technology programming languages

Which containers may have a MenuBar?

  1. Panel

  2. Frame

  3. Class

  4. JVM

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

In AWT (Abstract Window Toolkit), only a Frame can have a MenuBar. The Frame class has a setMenuBar() method that allows you to attach a MenuBar. Panel is a generic container and cannot have a MenuBar directly attached to it. Class and JVM are not GUI containers at all.