Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afa-farkhod/bouncing-ball-javafx_animation
Bouncing Ball JavaFX animation
https://github.com/afa-farkhod/bouncing-ball-javafx_animation
bouncing-ball java javafx
Last synced: about 1 month ago
JSON representation
Bouncing Ball JavaFX animation
- Host: GitHub
- URL: https://github.com/afa-farkhod/bouncing-ball-javafx_animation
- Owner: afa-farkhod
- License: apache-2.0
- Created: 2023-04-11T06:13:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-01T09:32:22.000Z (over 1 year ago)
- Last Synced: 2024-04-24T11:08:02.624Z (9 months ago)
- Topics: bouncing-ball, java, javafx
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bouncing-Ball-JavaFX_Animation
Bouncing Ball JavaFX animation- Following program displays bouncing balls and enables the user to add and remove balls, moreover there is sliding bar on top of the window which enables to control the speed of bouncing balls, speed can be increased and decreased respectively.
- Each ball has its state: the 'x' and 'y' coordinates, color, and direction to move. We can define a class named Ball that extends javafx.scene.shape.Circle. The 'x' and 'y' coordinates and the color are already defined in Circle. When a ball is created, it
starts from the upper-left corner and moves downward to the right. A random color is assigned to a new ball. The MultiplBallPane class is responsible for displaying the ball and the MultipleBounceBall class places the control components and implements the control. The relationship of these classes is shown in the following UML diagram.- Demo implementation: