标签:
1 public class MouseAdapterTest extends Frame 2 { 3 public static void main(String[] args) 4 { 5 Frame f = new Frame(); 6 f.setBounds(500, 500, 200, 200); 7 f.addMouseListener(new asd()); 8 f.setVisible(true); 9 } 10 } 11 class asd extends MouseAdapter 12 { 13 @Override 14 public void mouseClicked(MouseEvent e) { 15 System.out.println("鼠标点击了"); 16 } 17 }
标签:
原文地址:http://www.cnblogs.com/cyg-06/p/5954302.html