Java AWT Unit 1 Quiz
32 Questions
1 Views

Java AWT Unit 1 Quiz

Created by
@SupportingPulsar

Questions and Answers

The various controls supported by AWT are?

  • All of these (correct)
  • Checkboxes, choice, list
  • Labels, push buttons
  • Scroll bars, text area, text field
  • The concept of the menu bar can be implemented by using three Java classes—?

  • MenuBar
  • MenuItem
  • Menu
  • All of these (correct)
  • What is the constructor that the Text Event class defines?

    TextEvent(Object source, int event_type)

    In Java an event is an _______ which specifies the change of state in the source.

    <p>Object</p> Signup and view all the answers

    The classes and interfaces defined in AWT are contained within the ______ package.

    <p>java.awt.*</p> Signup and view all the answers

    What is the general form to set a specific type of layout manager?

    <p>void setLayout(LayoutManager lm)</p> Signup and view all the answers

    The AWT container is an instance of the ___________ class?

    <p>Container</p> Signup and view all the answers

    A checkbox is a control that consists of?

    <p>Both a &amp; b</p> Signup and view all the answers

    Java applets are used to create _______________ applications?

    <p>Both a &amp; b</p> Signup and view all the answers

    AWT means?

    <p>Abstract Window Toolkit</p> Signup and view all the answers

    An event is generated when the internal state of the event source is________?

    <p>Changed</p> Signup and view all the answers

    Positions the components into five regions: east, west, north, south, center?

    <p>BorderLayout</p> Signup and view all the answers

    Arranges the components as a deck of cards such that only one component is visible at a time?

    <p>CardLayout</p> Signup and view all the answers

    Arranges the components horizontally?

    <p>FlowLayout</p> Signup and view all the answers

    Arranges the components into a grid?

    <p>GridLayout</p> Signup and view all the answers

    __________ creates a dropdown list of textual entries?

    <p>Choice</p> Signup and view all the answers

    The Component class is an abstract class and so its ____________ are used to create components?

    <p>Subclasses</p> Signup and view all the answers

    The AWT classes can be roughly categorized into the following groups?

    <p>All of these</p> Signup and view all the answers

    An Applet is a ________ of Panel?

    <p>Subclass</p> Signup and view all the answers

    The subclasses of Window are?

    <p>Both a &amp; b</p> Signup and view all the answers

    A menu bar represents?

    <p>A list of menus which can be added to the top of a top-level window</p> Signup and view all the answers

    Each menu is associated with a _________ list of menu items?

    <p>Drop-down</p> Signup and view all the answers

    The two types of menus which are given as follows?

    <p>Both a &amp; b</p> Signup and view all the answers

    Regular menus are placed at the __________ of the application window within a menu bar?

    <p>Top</p> Signup and view all the answers

    The text field and text area controls create a _________________ area respectively?

    <p>Both a &amp; b</p> Signup and view all the answers

    A push button is an active control that has a _____________ appearance?

    <p>Three dimensional</p> Signup and view all the answers

    _____________ is a superclass of TextField and TextArea classes that is used to create single-line or multiline textfields respectively?

    <p>TextComponent</p> Signup and view all the answers

    A label is a simple control which is used to display_____________ on the window?

    <p>Text(non-editable)</p> Signup and view all the answers

    ______________ is an abstract class that encapsulates all of the attributes of a visual component?

    <p>Component</p> Signup and view all the answers

    A _______ object is responsible for remembering the current foreground and background colors?

    <p>Component</p> Signup and view all the answers

    Which class is a subclass of Component?

    <p>Container</p> Signup and view all the answers

    The ______ class is a concrete subclass of Container?

    <p>Window</p> Signup and view all the answers

    Study Notes

    Abstract Windowing Toolkit (AWT)

    • AWT provides various controls, including labels, push buttons, checkboxes, choices, lists, scroll bars, text areas, and text fields.
    • Menu bars in AWT can be implemented using MenuBar, Menu, and MenuItem classes.
    • The TextEvent class constructor is defined as TextEvent(Object source, int event_type).
    • An event in Java is an object specifying the change of state in the source.
    • Classes and interfaces in AWT are located within the java.awt.* package.
    • The general form to set a specific type of layout manager is void setLayout(LayoutManager lm).
    • AWT containers are instances of the Container class, which holds various components and other containers.
    • A checkbox consists of a combination of a small box and a label, enabling binary selections.
    • Java applets are primarily used for creating graphical and user-interactive applications.
    • AWT stands for Abstract Window Toolkit.
    • An event is generated when the internal state of the event source is changed.
    • The BorderLayout positions components into five regions: east, west, north, south, and center.
    • CardLayout arranges components like a deck of cards, showing only one at a time.
    • FlowLayout arranges components horizontally.
    • GridLayout arranges components into a grid format.
    • The Choice control creates a dropdown list of textual entries.
    • The Component class is abstract, with subclasses being used to create actual components.
    • AWT classes are categorized into GUI Components, Layouts, Graphics Tools, and Event Handlers.
    • An Applet is a subclass of the Panel class.
    • Subclasses of Window include Dialog and Frame.
    • A menu bar displays a list of menus at the top of a top-level window.
    • Each menu is associated with a drop-down list of menu items.
    • Two types of menus in AWT are pop-up menus and regular menus.
    • Regular menus are positioned at the top of the application window within a menu bar.
    • Text field creates a single-line text area, while text area creates a multi-line text area.
    • A push button is an active control that typically has a three-dimensional appearance.
    • TextComponent is the superclass of TextField and TextArea classes, enabling single-line or multiline text inputs.
    • A label is used to display non-editable text on the window.
    • The Component class encapsulates attributes of visual components.
    • A Component object remembers the current foreground and background colors.
    • Container is a subclass of Component.
    • The Window class is a concrete subclass of Container.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Test your knowledge on Abstract Windowing Toolkit (AWT) in this Unit 1 quiz. This quiz covers various controls supported by AWT, menu bar implementation through Java classes, and the Text Event class constructor. Challenge yourself to score high and deepen your understanding of Java AWT.

    More Quizzes Like This

    Java AWT and Event Driven Programming Quiz
    10 questions
    Mastering GUI Development in Java
    10 questions
    AWT Fundamentals Quiz
    5 questions

    AWT Fundamentals Quiz

    ExaltingSynergy avatar
    ExaltingSynergy
    Java GUI Components: AWT and Swing
    30 questions
    Use Quizgecko on...
    Browser
    Browser