A well known problem with Java Applets in webpages is that browsers ignore the z-index of the applet tag vs. other components in the page. No matter how you position and z-
There is a tricky solution for the problem. It's not necessary to have the code inside an iframe. We can have a dummy iframe just as a layer above the applet. And then an absolute div with the text can easily placed above that iframe.