Hi
i am new to java gui, i have trouble using color constructor.
please tell me what the problem .
thank you .
import java.applet.*;
import java.awt.*;
public class AnAppletSubclass1c extends Applet
{
Color c = new Color(5,25,205);
public void Color(int r,int g,int b);
public void init()
{
System.err.println("Hello from AnAppletSubClass.init - the current value of n is " + n);
c = Color.magenta;
}
public void paint(Graphics g) {
setBackground(c);
System.err.println("Hello from AnAppletSubClass.paint-- the current value of n is " + n);
n++;
}
int n = 0;
}
<HTML>
<HEAD>
<TITLE> An Applet Subclass 1c </TITLE>
</HEAD>
<BODY>
<p>Here is the output of my Program:</p>
<APPLET CODE="AnAppletSubclass1c.class" WIDTH=150 HEIGHT=100>
</APPLET>
</BODY>
</HTML>