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.
Hey everyone. I'm working on a project, involving a weather station updating a website. Currently, the site is online at http://www.weather.seniordesignprojects.com if you want to take a look for reference. Basically, there are three applets on that page. One displays some labels about the current weather (weather in my study, that is, with a fan blowing on the wind meter), and the other two are 24-hour history graphs of wind and temperature. I seem to have a problem displaying the two graphs. They are simply hand-made graphs used by drawing lines and such. It seems that one graph is always displayed twice, in both locations, and the other is displayed once, in it's proper location. The result is one location has both applets displaying on it. This happens in IE and Firefox. Does anyone know what causes this or what I can do to fix it? Thanks in advance!
Using Java 1.4 with both FireFox and IE only the first applet comes up OK. At least one of the others throws an exception, after which the browser tilts:
java.lang.Error: Do not use TempHistoryApp.add() use TempHistoryApp.getContentPane().add() instead at javax.swing.JApplet.createRootPaneException(Unknown Source) at javax.swing.JApplet.addImpl(Unknown Source) at java.awt.Container.add(Unknown Source) at TempHistoryApp.init(TempHistoryApp.java:23) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
That might be a good start for investigation. [ April 12, 2006: Message edited by: Ulf Dittmer ]
The following information may be of use to you. I have a web page with 12 frames. On each frame there is an instance of a Java applet. Each instance uses a different port. Each instance has a menu that is activated by moving the mouse on top of the applet. Sometimes, the same image appears on two different frames, which is the same problem you have. Moreover, when that happens, moving the mouse on top of one image activates the menu on the second image.
The first conclusion is that the phenomenon has little to do with the applet itself, although it could be triggered by some java feature used in both cases.
Second, I have found that usually, after refreshing the applets two or three times, the phenomenon disappears. I hope this helps, and if you find anything, please email me.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com