This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a Servlet that calls an applet like so output.writeBytes("<APPLET CODE='DavesApplet.class' ARCHIVE='DDavesApplet.jar' WIDTH=50 HEIGHT=50 CODEBASE='/BEAT/applet/'>"); The applet then uses an ObjectInputStream to connect to the servlet & get a Vector from the servlet. All this works fine except that the contents of the vector get printed to the screen. How can I leave the window in the browser blank? Ideally, I would prefer not to have the gray box of the applet appear either. D
In a properly written applet, the only way data - or anything else - is going to display is if the applet contains code to display it, so I have no idea why you have the first problem. As to the second, Java was designed from the ground up with mischief-makers in mind, so normally a browser is not going to allow an applet to be totally invisible, either by explicit hiding or by the trick of putting it in a small (0x0 or 1x1) area - the idea is that the user should KNOW that there's active logic on the webpage. I believe that the JRE will actually refuse to start an applet if its physical display area is too small.
An IDE is no substitute for an Intelligent Developer.