Java Basic


  1. Which of these methods can be used to change location of an event?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    TranslatePoint()


  1. Which of these methods can be used to obtain the coordinates of a mouse?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    getPoint() method can be used to obtain coordinates of a mouse, alternatively we can use getX() and getY() methods for x and y coordinates of mouse respectively.



  1. Which of these events is generated when the window is closed?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    A WindowEvent is generated when a window is opened, close, activated or deactivated.


  1. Which of these is superclass of ContainerEvent class?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    ContainerEvent is superclass of ContainerEvent, FocusEvent, KeyEvent, MouseEvent and WindowEvent.



  1. Which of these methods can be used to know the type of focus change?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    There are two types of focus events – permanent and temporary. The isTemporary() method indicates if this focus change is temporary, it returns a Boolean value.