I am trying to get a dice game image to windows desk in order to continue with the development process, yet Java is only showing me build success when I press play.
Can someone explain to me how to get the image from Java JFrame (Netbeans 12.3) to windows desk
Thanks in advance.
CodePudding user response:
Thanks for answering. I am new in this. I meant that in order to be able to roll the dices it is necessary to move the image from Jframe where there it's only an image of two dices, to the windows desk where the start button can be enable as a switch, and the two dices can roll to any of the six images on each one of them. JFrame was only to create the image. Everything really becomes a game on the windows desk. When I pressed play, an icon had to appear on the windows desk. That never happened.
CodePudding user response:
I'm not sure if you understand how Java development works.
You have to create a complete Java application. This application will play whatever game you're creating. If you're just rolling dice, the Java application has to provide the animation that simulates rolling dice. There are several example of dice rolling on the Internet.
When you've completed your Java application, you create a runnable JAR file. You place this runnable JAR file somewhere in your Windows file structure.
In Windows, you create an icon that executes your runnable JAR file.
it would require a textbook to explain all these steps in detail. I suggest you find a textbook you like.