资 源 简 介
本例制作一个会滚动的圆盘的小动画,执行例实例后,将创建一个由蓝白两种颜色组成的面板,其上有一个静止的黑色圆盘。当点击start按钮时,圆盘开始滚动,接触到边界时反弹,当点击stop按钮时,圆盘停止运动。本实例的知识点有:使用Java2D技术来绘制图形。如何通过线程控制动画。-This example will produce a small rolling disc animation, examples of the implementation of cases, it will create a composition of two colors from the blue panel on which there is a stationary black disk. When you click on start button, the disc began to roll when you come into contact with the boundary rebound, when click the stop button, the disc stop exercising. Knowledge points in this instance are: use Java2D techniques to draw the graph. How to control the animation thread.