Firstly, I hope that you authenticated the downloaded application correctly before launching it (by downloading it via SSL or verifying it using digital signature, in which case you can also sign the bank).
To the problem. It can be easy because you are working in the JVM applet. The life cycle of the jvm applet is determined by the browser. So, if you still want to use the applet as a launcher, then paste some debugging results into the Applet.destroy() , Applet.stop() methods of your applet subclass and see if this is related to disconnection.
Another solution might be to run it using Java Webstart. This is truly the best way to run Java applications from the Internet.
source share