- #1
Nec
- 50
- 0
In my JFrame, I already draw a 2d star, i would like to make it move around in my frame, but i don't know how to erase the old star when it appears in a new position, can anyone here help me with this ?
Thanks
Thanks
Java is a high-level, object-oriented programming language that is commonly used for developing web and mobile applications. It is used for your moving star because it allows for efficient and flexible coding, making it easier to create interactive and dynamic elements like a moving star on a webpage.
Creating a moving star using Java involves using the programming language to define the star's properties, such as its size, position, and speed, and then using animation techniques to make it move across the screen. This can be achieved by using Java libraries and frameworks like JavaFX.
Yes, you can control the movement of the star by manipulating its properties, such as its speed and direction, in your Java code. You can also use user input, such as keyboard or mouse events, to control the star's movement.
No, there are other programming languages that can also be used to create a moving star, such as JavaScript and HTML5. However, Java is a popular choice for developing interactive and animated elements on webpages due to its versatility and robustness.
Yes, there are many online tutorials and resources available that can guide you through the process of creating a moving star using Java. You can also refer to Java documentation and join online communities to seek help and advice from other programmers.