开发一个在窗格内移动一个圆圈的图形。您应该定义一个用于显示圆的窗格, 并提供向左、向右、向上和向下移动圆的方法,
请开发一个在窗格内移动一个圆圈的图形。定义一个用于显示圆的窗格, 并提供向左、向右、向上和向下移动圆的方法。检查边界, 防止圆圈完全移出视线 (例如, 如果圆圈几乎移出右手一侧的符号, 则应从左手一侧重新进入窗格)please develop a proagram that moves a circle inside a pane. You should define a pane for displaying the circle and provide the methods for moving the circle left, right, up, and down, as shown in the figure below. Check the boundary to prevent the circle from moving out of sight completely (for example, if the circle almost moving out of sign on the right-handed side, it should reenter into the pane from left-handed side)
[此贴子已经被作者于2018-12-20 23:03编辑过]