public PaintPanel()
{
// handle frame mouse motion event
addMouseMotionListener(
new MouseMotionAdapter() // anonymous inner class
{
// store drag coordinates and repaint
public void mouseDragged( MouseEvent event )
{
if ( pointCount < points.length )
{
points[ pointCount ] = event.getPoint(); // find point
pointCount++; // increment number of points in array
repaint(); // repaint JFrame
} // end if
} // end method mouseDragged
} // end anonymous inner class
); // end call to addMouseMotionListener
}
PaintPanel.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:GPLshared
作者:
评论列表
文章目录