changing background in java applet/html?

Jeremy

New member
I am trying to change the background color in my java applet, but i can't seem to get it working. here is what i have for my applet so far, and also the html

// Final Exam: JavaTutor.java
// Program is web page with listed links that leads to other
// final exam requirements

import javax.swing.JApplet;
import java.awt.Color;

public class JavaTutor extends JApplet
{
// change background color
public void init()
{
this.setBackground ( Color.BLUE );
}
}

<html>
<body>
<applet code = "JavaTutor.class" width = "1675" height = "950">
</applet>
</body>
</html>
 
Back
Top