We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm using cp5 to build a little particle sketch and I need to be able to replace an image from the interface. I have trouble finding out:
I've been trying the file requester code in 'javax.swing.*' but I don't really understand what I'm doing and although the code should only triggered when a cp5 button is pressed when I compile the sketch and run it the file dialogue shows up when the sketch starts. Tres bizarre.
Any ideas?
Answers
Hi! Processing already includes a file selector.
You should add file-type checking to avoid trying to load non-image files as images (you could just check that the path ends in ".jpg" for instance).