0

I'm going to make a java application with nifty-gui[1] using java web start

When user click on upload image, a file chooser is showed (FileOpenService)

After that, image should be visible in image control.

Unfortunately, nifty-gui can use images only from assets.

How to download this image into asset? Maybe there is a way to modify actual image using data from FileContent class?

Mosty Mostacho
  • 42,742
  • 16
  • 96
  • 123
Marek Bardoński
  • 529
  • 1
  • 5
  • 14

1 Answers1

0

This is solution, created after discussion [1]

assetManager.registerLoader(AWTLoader.class, "jpg");
assetManager.registerLocator("/", FileLocator.class);
            image(new ImageBuilder() {{
                filename("/home/marek/photo2.jpg");
            }});
Marek Bardoński
  • 529
  • 1
  • 5
  • 14