Mouse Listner

This commit is contained in:
Noah
2021-09-30 14:43:45 +02:00
parent b09950c480
commit 4aec1db908
2 changed files with 15 additions and 0 deletions
+13
View File
@@ -375,6 +375,19 @@ public class GUI {
draw.setVisible(true);
jfGame.addMouseMotionListener(new MouseMotionListener() {
@Override
public void mouseDragged(MouseEvent e) {
int x=e.getX();
int y=e.getY();
System.out.println(x+","+y);
}
@Override
public void mouseMoved(MouseEvent e) {
System.out.println("Not Pressed");
}
});
jfGame.add(draw);