Java2Script provides an Eclipse Java to JavaScript transpiler, with a nearly complete implementation of the Java Virtual Machine with AWT and Swing in JavaScript, with simple, automated parallel creation of both class files and js files. To date, over 600 applets have been converted.
This depends upon the dependency libraries. They all need to have source available. Image processing has been experimented with and worked in preliminary tests.
https://github.com/lbalazscs/Pixelitor