0

Is it possible to send an Image object from JavaScript to an applet? Say I have a method in my applet like so:

public void setImage(Image newImage){
     trayIcon = new TrayIcon((new ImageIcon(path)).getImage());
}

and I'm calling said method from my javascript as:

applet.setImage(myImage);

Is there anyway I can send an Image as an Image object to Java?

Ph33ly
  • 663
  • 3
  • 13
  • 29
  • possible duplicate of [How to send an image from a Java Applet to JavaScript?](http://stackoverflow.com/questions/3577834/how-to-send-an-image-from-a-java-applet-to-javascript) – techdude Aug 06 '15 at 22:26
  • @techdude It's similar but it appears to be the reverse of what I need. I know this might be a dumb question, but is the Image object `var img = new Image();` compatible with Java's Image object? – Ph33ly Aug 07 '15 at 00:10
  • *"..is the Image object var img = new Image(); compatible with Java's Image object?"* ..what happened when you *tried it?* – Andrew Thompson Aug 07 '15 at 11:23

0 Answers0