正在加载图片...
10 32鼠标产生的事件 import java. awt. * import java applet applet; public class CountClick extends applet Rint Currentmarks=0 public boolean mouse Down (Event evt, int x, int y) i Currentmarks++; repaint return trues public void paint(graphics g) ig drawString("+CurrentMarkS, 10, 10); 练习对鼠标的点击动作计数10 import java.awt.*;import java.applet.Applet; public class CountClick extends Applet {int CurrentMarks=0; public boolean mouseDown(Event evt,int x,int y) { CurrentMarks++; repaint(); return true; } public void paint(Graphics g) { g.drawString(" "+CurrentMarks,10,10);} } 3.2鼠标产生的事件 [练习]对鼠标的点击动作计数
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有