Topic: 怎么自定义鼠标形状??? |
Print this page |
1.怎么自定义鼠标形状??? | Copy to clipboard |
Posted by: leihongfei Posted on: 2004-09-04 16:12 我想当鼠标移到面板就变成我设置的图标 private class MouseMotionHandler implements MouseMotionListener { public void mouseMoved(MouseEvent event) { Toolkit kit=Toolkit.getDefaultToolkit(); Image img=kit.getImage("HAND.CUR"); Cursor dynamiteCuror=kit.createCustomCursor(img, new Point(10,10),"dynamite stick"); // setCursor(Cursor.getPredefinedCursor(dynamiteCuror)); } 编译可以通过 但是运行不了 setCursor(Cursor.getPredefinedCursor()) 接受的是一个int参数 请问怎么改啊 谢谢 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |