|
@ -0,0 +1,60 @@ |
|
|
|
|
|
package solitaer; |
|
|
|
|
|
|
|
|
|
|
|
import java.awt.Component; |
|
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
|
import javax.swing.event.MouseInputListener; |
|
|
|
|
|
|
|
|
|
|
|
public class MyMouseListener implements MouseInputListener { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
|
|
// TODO Auto-generated method stub |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
|
|
// TODO Auto-generated method stub |
|
|
|
|
|
System.out.println("DOWN"); |
|
|
|
|
|
Component com = SwingUtilities.getDeepestComponentAt( |
|
|
|
|
|
e.getComponent(), e.getX(), e.getY()); |
|
|
|
|
|
System.out.println("########"); |
|
|
|
|
|
System.out.println(com.toString()); |
|
|
|
|
|
System.out.println(com.getParent().toString()); |
|
|
|
|
|
System.out.println("########"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void mouseReleased(MouseEvent e) { |
|
|
|
|
|
// TODO Auto-generated method stub |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void mouseEntered(MouseEvent e) { |
|
|
|
|
|
// TODO Auto-generated method stub |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
|
|
// TODO Auto-generated method stub |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void mouseDragged(MouseEvent e) { |
|
|
|
|
|
// TODO Auto-generated method stub |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void mouseMoved(MouseEvent e) { |
|
|
|
|
|
// TODO Auto-generated method stub |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |