MouseMotionListener #JAVA
-
Frame에 MouseMotionListener 사용하는 방법01 [JAVA]JAVA/Java 2019. 7. 17. 19:11
01. MouseMotionListener를 implements로 받아 사용하는 방법 public class TimerTest extends Frame implements MouseMotionListener { static int timer = 0; TimerTest(){ addMouseMotionListener(this); setSize(300,300); setLayout(null); setVisible(true); } public static void main(String[] args) { new TimerTest(); testGo(); } public static void testGo() { while (true) { try { System.out.println(timer); Thread.sleep..