applet

Why does Firefox terminate my applet after 20 seconds?

I have a simple applet on a web page like this. (This is a test case cut down from a more complicated applet). package test; import java.applet.Applet; @SuppressWarnings("serial") public class SimpleLoopApplet extends Applet { public void init() { System.out.println("SimpleLoopApplet invoked"); try { ...

Can a Java made applet send information to the server?

I want to know if an applet made in java, can send data to the server and store it on a data base. I'm trying to make something that is executed on the client side and gather information from the execution (sort of a game, i need time, correct and incorrect clicks). Is it better to do with JApplets or JavaScript? For a description of wh...

How to call javascript from applet without use showDocument ?

Hi, I'm using getAppletContext().showDocument(new URL("javascript:" + command)); to call javascript from applet. But sometimes in firefox this doen't work, I don't know why. So, now I'm trying to use JSObject, using this: JSObject jsObject = new JSObject(); jsObject.eval(command); But I got this error: Exception in th...

Does AccessController.doPrivileged give JavaScript threads the permissions of the signed Applet?

I'm looking at a signed Applet that is heavily called from JavaScript. Obviously, the threads that originate from JavaScript are more heavily sandboxed than any thread started directly from within Java. For example, if a JavaScript thread calls into the Applet and logs something that causes the log file to roll, a security exception is...

How do you add a picture in an applet (java) after a button is pressed?

I have found an odd way of putting a picture in an applet just by itself, but it doesn't seem to work when i put the code in the buttonListener for the picture to show when a button is pressed. If you could also give me the simplest code for putting a picture in an applet, it would be very much appreciated! the code that works: import ...

can a applet open a socket connection to its server

can a applet open socket connection to the server? ...

Applet lifecycle: what's the practical difference between init() & start(), and destroy() & stop()?

The javadoc and tutorial have information about the four applet lifecycle methods (init() -> start() -> stop() -> destroy()). But they talk mostly in abstract language. What I'm looking for are concrete examples of when it makes a difference if I put my code in init vs start, and similarly for destroy vs stop. The only thing I've foun...

JButton will work but won't display my icon when it is clicked on.

I have a buttonlistener that removes the TextFields and the StartButton when it is clicked, but the last part of the code that tells it to run a method that is supposed to display the icon is screwing up only at the end, but is still deleting the TextFields and the JButton. Please help. public class TypeInNames extends JApplet{ JButt...

Start an applet from a servlet...

I have been searching on how to start an applet from a servlet. Everything on the web so far has been on the opposite, connecting to a servlet from an applet. I am writing a gwt/j2ee app and need to post data to a servlet, then have the servlet start an applet and pass serialized objects to the applet. The applet would then send data bac...

signed applet throws security warning, but runs if yes button if clicked.

I have a signed applet that builds a menu from an xml file. When it loads I get the java security warning regarding signed and unsigned code. The applet uses jdom.jar It doesn't matter if I hit yes on the security warning dialog box to block the unsigned code, or if I click no, the applet launches and runs as expected. I have found...

Security issues with applet

I have developed an applet. But when my browser fetches it from the webserver it pops a security warring. I don't want this message to come. Meaning applet should run without the end users permession. How can I do that? Do I need to get my applet signed? If yes, from where can i get it signed? What's the cost of geting it signed? ...

Simple way to have a hybrid JTextField / JPasswordField?

I am developing a simple applet that has a simpe sign-in interface. And to be concise in space, I have two JTextFields for username and password, which I also use as labels. i.e. to start with, the username JTextField will be pre-filled with grey text saying "username" and the password JTextField pre-filled with "simple password". Th...

Preventing decompiling of applet

Possible Duplicate: Is it worth to obfuscate java web application? I have writen an applet. I don't want other people to decompile it using easily availabe decompilers. I have taken lots of pains to implemented the code. Can anyone suggest how I can protect my applet from geting decompiled? ...

Java: Calling .dll from a LOCAL applet... I'm doing something wrong

There should be no security restriction because the applet is locally installed. Yet I get: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jzmq) when my app tries to call static{ System.loadLibrary("jzmq"); } What gives? What am I missing for it to work smoothly without a security ...

Native Library already loaded in another classloader"

I need some help to handle following scenario. I am using two applets which requires the same native library (.dll) file. So when I run the applets from the web pages, for the first time first applet loads the dll into the applet class loader. It works fine. But when second applet tries to load the same dll it gives me exception sayin...

Detect when an Applet is loaded

How can I detect whether a java-applet has been loaded successfully without polling the browser /using setTimout ? Is there any event that I can bind to? The problem is: there is a pop up asking the user whether he trusts the applet or not, and that takes a few seconds until the user clicks "Yes" ,meanwhile my code fails to execute be...

Cross-compiling Java to JavaScript

I have developed a Java applet which opens a URL connection to some different server. The applet then retrieves contents of the HTML page and do some processing and then shows to user. Can I cross-compile it to JavaScript using GWT? ...

Java Applet Sign

I have written an applet with Netbeans. When I click on Clean and Build then Netbean create a jar file "Test.jar" and also another folder called lib in the same directory. I've signed the Test.jar. Basically this applet upload files to server with FTP. So when Applet loads into browser then I am able to select files but when I click on u...

How can I make an applet look better?

I want to create an applet that when embedded into html page does not make it look like an applet. Meaning it should go good with webpage and should not look as if it is some separate thing. It should look as if it's a part of HTML. I want my applet to look beautiful. How can I achieve that? ...

Java to JavaScript communication

I want to access HTML elements from within my Java applet. Like I want to do following: Pass a value of text box to applet From applet I want to set some text inside an HTML page. Like applet takes some input from text box. Does processing and then print output as href on HTML page. How can i do this? I heard of some java library: ...