Hey there, I am sure this is an issue every java novice comes up against when they start but my java applet is displaying completely differently in firefox than it is in Chrome and IE. It seems as though paint()/repaint isn't working in firefox because I get black text on a black background but when I drag another window over the applet the black background gets filled with the graphics from the window on top. Chrome and IE are fine. Any help? Code: import java.awt.*; public class SalutonApplet extends javax.swing.JApplet { String greeting; public void init(){ greeting = "Saluton mondo!"; } @Override public void paint(Graphics screen){ Graphics2D screen2D = (Graphics2D) screen; for(int i = 0;i<7;i++){ screen2D.setColor(Color.black); screen2D.drawString(greeting, 100, 100); repaint(); } } public void repaint( Graphics2D g ) { update( g ); } }
The html <html> <head> <title>Saluton mondo!</title> </head> <body bgcolor="000000" Text="#FF00FF"> <p>This is a Java Applet.</p> <applet code="SalutonApplet" codebase="..\\..\\build\\classes" height="150" width="300" > <p>You need a Java Enabled Browser to see this.</p> </applet> </body> </html>