So, here’s what I’m doing, I’m trying to make an applet for a web game to create “ordinary” avatars, this avatar is to some extent from the country's army, so the avatar will touch the image of the user and the frame in the image thtat represent the square to which belongs user.
So my plan is to get them to select from a file from their computer, and then select the squd to which they belong. After that, they will see a picutre preview, and they will be able to save it on their computer in order to subsequently use it in the game.
I know that you can draw an image using Graphic or Graphic2D against the background of the component, but then when I want to save it to a file, how do I do it?
source
share