Why doesn't it display the output for mouseReleased and mouseClicked in console? Is there something that I am missing?
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class MouseMotion extends Applet implements MouseMotionListener{
public void init() {
addMouseMotionListener(this);
}
public void mouseDragged(MouseEvent e) {
System.out.println("mouse is being dragged at location (" + e.getX() + ", " + e.getY() + ")");
}
public void mouseMoved(MouseEvent e) {
System.out.println("mouse is being moved at location (" + e.getX() + ", " + e.getY() + ")");
}
public void mouseReleased(MouseEvent e){
System.out.println("Mouse has been released at location (" + e.getX() + ", " + e.getY() + ")");
}
public void mouseClicked(MouseEvent e) {
System.out.println("Mouse has been clicked at location (" + e.getX() + ", " + e.getY() + ")");
}
}