Java: GUI - Moving Graphics

preview_player
Показать описание
Using TimeUnit to move a component
Рекомендации по теме
Комментарии
Автор

like it, im mainly here because I dont know how to use Jframes, JPanels or Graphics. Heres a tip though, Instead of using the boolean 'right' you could use a velocity variable that changes to positive and negetive depending on what direction its going. just add the velocity to x, this way you can also control the speed of the ball without changing the time delay.(there are alot of little mistakes but I dont really need to mention them, doesnt really effect the outcome)

solarranks