applet

java.awt.HeadlessException - Applet not displayed - Part 2

This is with reference to question java.awt.HeadlessException - Applet not displayed. http://stackoverflow.com/questions/445049/java-awt-headlessexception-applet-not-displayed The HeadlessException went away after I added "export DISPLAY=:0.0" in tomcat's startup.sh file. Now some part of the code is run on a batch server which is a sep...

SAX Parser In Applet Failure

I have a very simple line of code in my source: XMLReader xmlReaderFactory = XMLReaderFactory.createXMLReader(); This works flawlessly from an application, however, from an applet, it attempts to load a ".class" file from the server (no classname, just the extension just as you see) and then fails to give me a parser. Exception in th...

How to access objects/arrays defined in JavaScript from Java applets.

Using LiveConnect getMember(String) method of a window JSObject, a Java object of type "Object" is returned but I don't find the expected members defined on it. Neither can I cast it to a JSObject to continue using the getMember(). Accessing DOM nodes and elements (DOM Objects) works as expected. ...

How do I get a simple, Hello World Java applet to work in a browser in Mac OS X?

I'm using Java SE 1.6 on Mac OS X 10.5.6. The code for my applet is as follows: import java.awt.Graphics; import javax.swing.JApplet; public class HelloWorld extends JApplet { public void paint( Graphics g ) { super.paint( g ); g.drawString( "Hello World!", 25, 25 ); } } I compiled this to a .class ...

Which HTML tag is the proper one to use for Java applets (APPLET, EMBED, OBJECT)?

My understanding is that APPLET is deprecated and OBJECT is the preferred tag to use for Java applets. Is this correct? A lot of Java applet examples, both on the web and in books, still seem to use the APPLET tag. Are there any browser compatibility issues that OBJECT suffers from (compared to APPLET)? Also, can you provide an examp...

How to write a GNOME applet with Ruby

Is there a good guide or tutorial for writing GNOME applets with Ruby? ...

Drag and drop image into a web form

We have a web page (HTML javascript and PHP mostly) that allows a user to upload an image. We have the normal browse button, and it works fine. However, we want to add the functionality to drag and drop an image into the text field instead. gmail allows you to do this in their mail app, so it's possible. The only way we've thought of to...

Japanese font apperaring garbled in an applet

i have a java swing application jar running as an applet in a jsp.In one of the JTextfields a user cuts pastes japanese language characters and this shows up garbled.However when i run the same application as an applet from RAD it shows up just fine.Also the JSP have the content to be represented as UTF-8 as per the META tag. ...

Java Applet - Image Export Performance Issues

I have a Java Applet that I'm making some edits to and am running into performance issues. More specifically, the applet generates an image which I need to export to the client's machine. This is really at the proof-of-concept stage so bear with me. For right now, the image is exported to the clients machine at a pre-defined location (T...

Are Java Applets unable to communicate with javascript within Firefox on Mac OS ?

I have a java applet running in a browser that is calling some javascript functions and expecting a result from theses functions. This is working with the following configurations : Internet Explorer FireFox / Windows Safari / Mac BUT It's not working with Firefox on MAC OS The source of the problem seems to be the win.eval calls th...

How to allow two applets to work that use different jre's

Got two applets. Applet A requires 1.6+ Applet B doesn't work in 1.6 (1.4 works) How do I get them both to work? ...

Applet is empty with absolute layout

Hi there, I want to create a hangman game as an applet, so I have some labels and buttons that will be initialized by the generated code of the gui designer but I also have some labels I create on my own, after knowing how long my word is. Therefore I use absolute layout for my applet. In netbeans my applet works finde when I run it bu...

Why does this applet have a destroy method?

I've been trying to learn about applets by studying the code for the "Welcome to HotJava" applet. I decompiled the *.class file using the Windows version of Jad, and I see the following lines of code public void init() { // Skip some lines... addMouseListener(this); } public void destroy() { removeMouseListener(this); } I...

read file in an applet

Hi there I want to read out a file that lies on the server. I get the path to the file by a parameter <PARAM name=fileToRead value="http://someserver.de/file.txt"&gt; when I now start the applet following error occurs Caused by: java.lang.IllegalArgumentException: URI scheme is not "file" Can someone give me a hint? BufferedReader ...

Java applet double buffer trouble (and loop trouble)

For some reason when I try to double buffer my Java applet it shows up a white square even though I'm not telling it to. Also if I try to put a loop in start() I get only a white screen even if repaint() is at the end. /** * @(#)vo4k.java * * vo4k Applet application * * @author William Starkovich * @version 1.00 2009/2/21 */ import jav...

Why do applets have such a low adoption level?

Why do applets have such a low adoption level, compared for example against Flash? Is it because they are technological disadvantages, or is it just an issue of popularity? ...

How can I make fonts resize with the window in Applet JLabel components?

As the question says... I can set the layout etc. up to resize with the window, but I've not worked out how to make the fonts resize. (Actually it might be the JLabel components themselves that aren't resizing, and constraining the fonts...) ...

How can a web page communicate with a local rich client application

Hi, I need to implement a process where users punch in a few details into a web page, and have this information fired as some sort of an event to a Java rich client application (SWING) on the same host. One idea was perhaps implementing an applet that would initiate socket communication with a listener implemented by the SWING applicat...

Can signed applets connect with a different host from which they originate?

I need an applet to open a socket and communicate with a server listening on the local host to which the applet downloaded (the end user machine). contrary to what I have read about applet security, it seems that even signed applets cannot open a socket to a different host from which they were downloaded (on the same machine it works p...

JAR multiple download

I have this code on an applet. The applet works ok, but I get a lot of unnecessary duplicate download. In particular, I have noticed that each "getResource" triggers a download of the .JAR file. static { ac = new ImageIcon(MyClass.class.getResource("images/ac.png")).getImage(); dc = new ImageIcon(MyClass.class.getResource("image...