I tried compiling this program
import java.awt.*;
import java.applet.*;
public class Excercise extends
Applet {
public void init() {
Frame f = new Frame("First Frame");
f.setSize(200,200);
String E = "Excercise-
test area should not have scrollbars and should not be editable ";
TextArea ta = new TextArea(E,8,TextArea.SCROLLBARS_NONE);
ta.setEditable(false);
// ta.setBackground(Color.black);// line 1
// ta.setForeground(Color.yellow); // line 2
f.add(ta);
f.pack();
f.setVisible(true);
}
}
I am getting the folloing compiler error. ie error at line 1 and 2
Excercise
java:14:No variable black defined in class Color
Excercise java:15:No variable yellow defined in class Color
can anyone pls tell me whats happening?
Am i missing something??
-bani