Java MouseListener
Java MouseListner is a interface that responds to the actions performed by mouse events generated by the user. Example: mouse clicks , mouse movements, etc.
There are 5 Methods associated with MouseListner:
1. mouseClicked(MouseEvent e):
Responds to mouse buttons when clicked on a component in the Application.2. mousePressed(MouseEvent e):
Responds to mouse button is Pressed on a component in the Application.3. mouseReleased(MouseEvent e):
Responds to Mouse button released after being pressed over a component in the Application.4. mouseEntered(MouseEvent e):
Responds to the situation when a Mouse cursor enters the bounds of a component in an Application.5. mouseExited(MouseEvent e):
Responds to the situation when a Mouse cursor exits a component’s bounds.
Java AWT Tutorial
Java AWT or Abstract Window Toolkit is an API used for developing GUI(Graphic User Interfaces) or Window-Based Applications in Java. Java AWT is part of the Java Foundation Classes (JFC) that provides a way to build platform-independent graphical applications.
In this AWT tutorial, you will learn the basics of the AWT, including how to create windows, buttons, labels, and text fields. We will also learn how to add event listeners to components so that they can respond to user input.
By the end of this tutorial, you will have a good understanding of the AWT and be able to create simple GUIs in Java.
Contact Us