I have no idea why this won't work, and it is driving me up the wall. I just
started applets, and I made an html file and a java file, the java file
compiles fine, and the html file displays the proper sized background in my
browser, yet no drawing elements show up on it!
HTML file:
<HTML>
<applet code = ClassGradesGraph.class width = 500 height = 500>
</applet>
</HTML>
JAVA file:
import java.awt.*;
import java.applet.Applet;
public class ClassGradesGraph extends Applet
{
private int x1 = 10;
private int y1 = 300;
//upper left corner of bar
private int x2 = 100;
private int y2 = 500;
//lower right corner of bar
public void paint(Graphics g)
{
g.setColor(Color.green);
g.fillRect(0, 0, 500, 500);
}//end method
}//end class ClassGradesGraph
Any ideas here would be greatly appreciated! I know that the html works ok,
as when I use different widths and heights it shows it appropriately. I have
tried numerous drawing methods to get ANYTHING to show up, but no go.
Tucker
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004