读书人

老师,状态栏里如何显示 鼠标当前位置

发布时间: 2012-03-22 17:43:57 作者: rapoo

老师,状态栏里怎么显示 鼠标当前位置
老师,请问 状态栏里怎么显示 鼠标当前位置
谁能给出代码呀,,,,,,


[解决办法]
Listen to Mouse Move Event, you will have the coordinate of current mouse location. Then you just display the coordinate values.

If you don 't know how to listen to event, please study hard on Java Tutorial on Swing.
[解决办法]
I think you are looking for this document. There is a sample code available for you to study.

http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html#caret

读书人网 >J2SE开发

热点推荐