Applets Section Index | Page 20
How can I change the size of an Applet/JApplet in a Web Page?
Short answer: you can't.
The browser defines a fixed-sized area in the web page for the Applet. If you need dynamic sizing, your only choice is to have your Applet display a Frame, Window, or Dia...more
I'm using the Java Plug-in and need to modify the policy file. Why isn't the Plug-in picking up my changes?
The Plug-in reads the policy file and key store only once at startup. If you need to modify either, you need to shutdown and restart the browser.
How do I run Swing Applets in a Browser?
While technically possible to use the Swing components in any Java 1.1-based browser, realistically is another story. The JAR file of Swing classes is approximately 2 MB, which would be required t...more
How do I get an applet to load a new page into the browser?
In short, get the applet's context and tell it to show a
different document: getAppletContext().showDocument(new URL("http://foo.com/whatever/blah.doc")).
You can also provide a target f...more
How can I download a file (for instance, a Microsoft Word document) from a server using a servlet and an applet?
Try telling the applet to call getAppletContext().showDocument("http://foo.com/whatever/blah.doc"). That makes the browser responsible for fetching and saving the document (including pu...more
How do I communicate with a JSP page from an applet?
This is basically the same as talking to any web page.
Check out:
http://www.jguru.com/jguru/faq/view.jsp?EID=157
and
http://www.jguru.com/jguru/faq/view.jsp?EID=14163more
When I try to load a .gif as an ImageIcon in a JLabel in my applet, a security exception (checkread) is thrown. The same code works with appletviewer. Why does this happen and how do I correct it?
The problem is that applets restrict read access to the local computer. This is a security measure meant to protect your computer from attacks such as reading your files and reporting them to some...more
Is it true that my RMI applet can make socket connections only to the host from which the applet was downloaded from?
Yes, the default behaviour for applets (including those that may be RMI clients) is to
communicate with an RMI server that is hosted on the same platform from which the applet ...more
I just installed the Java Plug-in within my browser, and now, System.out.println is no longer sending messages to my browser's Java console. Why?
I just installed the Java Plug-in within my browser, and now, System.out.println is no
longer sending messages to my browser's Java console. Why?
How can my applet or application communicate with my servlet?
It's pretty straightforward. You can use the java.net.URLConnection and java.net.URL classes to open a standard HTTP connection to the web server. The server then passes this informa...more