Home / CSE MCQs / AWT ::

CSE MCQs :: AWT

  1. Which is the container that doesn't contain title bar and MenuBars but it can have other components like button, textfield etc?
  2. A.
    Window
    B.
    Frame
    C.
    Panel
    D.
    Container

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. The Swing Component classes that are used in Encapsulates a mutually exclusive set of buttons?
  4. A.
    AbstractButton
    B.
    ButtonGroup
    C.
    JButton
    D.
    ImageIcon

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which package provides many event classes and Listener interfaces for event handling?
  6. A.
    java.awt
    B.
    java.awt.Graphics
    C.
    java.awt.event
    D.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. In Graphics class which method is used to draws a rectangle with the specified width and height?
  8. A.
    public void drawRect(int x, int y, int width, int height)
    B.
    public abstract void fillRect(int x, int y, int width, int height)
    C.
    public abstract void drawLine(int x1, int y1, int x2, int y2)
    D.
    public abstract void drawOval(int x, int y, int width, int height)

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Name the class used to represent a GUI application window, which is optionally resizable and can have a title bar, an icon, and menus.
  10. A.
    Window
    B.
    Panel
    C.
    Dialog
    D.
    Frame

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which is the container that doesn't contain title bar and MenuBars but it can have other components like button, textfield etc?
  12. A.
    Window
    B.
    Frame
    C.
    Panel
    D.
    Container

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. The Swing Component classes that are used in Encapsulates a mutually exclusive set of buttons?
  14. A.
    AbstractButton
    B.
    ButtonGroup
    C.
    JButton
    D.
    ImageIcon

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which package provides many event classes and Listener interfaces for event handling?
  16. A.
    java.awt
    B.
    java.awt.Graphics
    C.
    java.awt.event
    D.
    None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. In Graphics class which method is used to draws a rectangle with the specified width and height?
  18. A.
    public void drawRect(int x, int y, int width, int height)
    B.
    public abstract void fillRect(int x, int y, int width, int height)
    C.
    public abstract void drawLine(int x1, int y1, int x2, int y2)
    D.
    public abstract void drawOval(int x, int y, int width, int height)

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Name the class used to represent a GUI application window, which is optionally resizable and can have a title bar, an icon, and menus.
  20. A.
    Window
    B.
    Panel
    C.
    Dialog
    D.
    Frame

    View Answer

    Workspace

    Discuss Discuss in Forum