I am attempting to create a display for a bunch of meteorological data. The data is read from a web server and I want to use graphs to display it. I have JFreeChart working to create graphs, and it is dumping renders of the data to .png files. I am currently loading the .png into a material and displaying it on a quad; which is working quite well. The issue I have is that my separate java application will read and update the image files every time new data appears, and I cannot figure out how to make Jmonkey reload an asset. the “assetManager” is designed to prevent you from loading to same asset twice, but how can I get around this?
This was my attempt as loading an image directly:
File f = new File(“assets\Scenes\GraphTest\saved3.png”);
Texture t = assetManager.loadTexture(“Scenes/GraphTest/saved3.png”);
Image I = new Image();
I.read(BinaryImporter.getInstance()); //This Line Doesnot work.
System.out.println(“Worked”); // quick debug
System.out.println(“Read Error”); // quick debut
Material m = new Material(assetManager, “Common/MatDefs/Light/Lighting.j3md”);
The file is addressed correctly I am just not sure how to load it into a JME style Image? Should I be using Image.setData() ? or is there a completely different way to go about this?