public void mouseEntered(MouseEvent e) {
Button b = (Button) e.getSource();
int x = b.getX();
int y = b.getY();
x = (int) (java.lang.Math.random() * 500);
y = (int) (java.lang.Math.random() * 500);
b.setLocation(x, y); } 这是我的程序的一个小片段。。里面的e.getSource();有点理解不了啊!!大家帮帮忙!!谢谢!!
Button b = (Button) e.getSource();
int x = b.getX();
int y = b.getY();
x = (int) (java.lang.Math.random() * 500);
y = (int) (java.lang.Math.random() * 500);
b.setLocation(x, y); } 这是我的程序的一个小片段。。里面的e.getSource();有点理解不了啊!!大家帮帮忙!!谢谢!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货