So, I am doing a School project where we have to use Java Swing to create a game based on Travle, for the image of the map, I considered using a svg file so i could divide it by the layers, I then used Apache Batik to visualize it, but it doesn't work properly, This is the program running 3 different times, sometimes the map is right, sometime is small and other times it is too big.
Does anyone know why this happens?
canvas = new JSVGCanvas(); canvas.setURI(".\\src\\img\\mappa.svg");
This is the only thing about this i wrote in the code.
The names on the right are generated by random, so i thought that could be the problem, but even with them not being random, it stills happen.