Home / CSE MCQs / AWT ::

CSE MCQs :: AWT

  1. How many types of controls does AWT supports these controls are subclasses of component?
  2. A.
    7
    B.
    6
    C.
    5
    D.
    8

  3. Which are passive controls that do not support any interaction with the user?
  4. A.
    Choice
    B.
    List
    C.
    Labels
    D.
    Checkbox

  5. How many ways can we align the label in a container?
  6. A.
    1
    B.
    2
    C.
    3
    D.
    4

  7. The following way is used to create a frame is by creating the object of Frame class?
  8. A.
    inheritance
    B.
    association
    C.
    Both A & B
    D.
    None of the above

  9. Which of the following classes are derived from the Component class.
  10. A.
    Container
    B.
    Window
    C.
    List
    D.
    MenuItem

  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

  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

  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

  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)

  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