Class Reading Help.
Hello, I'm new here. I have a problem that I can't read from another class I have created. I am a student, using a glencoe book titled "Introduction to Computer Science Using JAVA". I am on an exerscise learning about colors. What I did was I created a java file, titles "FancyText1" with the code.
import java.awt.*;
publicclass FancyText1
{
publicvoid drawRed(Graphics g, String displayString)
{
g.setColor(Color.red);
g.drawString(displayString, 100, 100);
}
publicvoid drawBlue(Graphics g, String displayString)
{
g.setColor(Color.blue);
g.drawString(displayString, 100, 120);
}
}
then I compiled it and it complied without an error.
Next I created the java file that reads from it.
import java.awt.*;
import javax.swing.*;
publicclass FancyText1Testerextends JApplet
{
publicvoid paint(Graphics g)
{
FancyText1 ft1 =new FancyText1();
ft1.drawBlue(g,"MOO");
ft1.drawRed(g,"MOO");
}
}
this file is named "FancyText1Tester.java".
When I try to compile this, I get an error.
C:\j2sdk1.4.2_05\SourceTyrel\FancyText\Fancy\FancyText1Tester.java:8: cannot resolve symbol
symbol :class FancyText1
location:class FancyText1Tester
FancyText1 ft1 =new FancyText1();
^
C:\j2sdk1.4.2_05\SourceTyrel\FancyText\Fancy\FancyText1Tester.java:8: cannot resolve symbol
symbol :class FancyText1
location:class FancyText1Tester
FancyText1 ft1 =new FancyText1();
^
2 errors
what does this mean?
If I type the code Like this...
import java.awt.*;
import javax.swing.*;
publicclass FancyText1Testerextends JApplet
{
publicvoid drawRed(Graphics g, String displayString)
{
g.setColor(Color.red);
g.drawString(displayString, 100, 100);
}
publicvoid drawBlue(Graphics g, String displayString)
{
g.setColor(Color.blue);
g.drawString(displayString, 100, 120);
}
publicvoid paint(Graphics g)
{
drawRed(g,"Red Fish");
drawBlue(g,"Blue Fish");
}
}
and name the file "FancyText1Tester.java" it compiles. Why can I not read the FancyText1.class?

