My problem is that when trying to set the background color in a JApplet i'm trying to create, i am unable to get any color other than the default gray.
I would really appreciate it if someone was able to not only tell me whats wrong but also explain it. This technique was learned through a textbook and so, i want to understand the problem so that i know what is going on.
Any and all help is appreciated.
Thank you in advance,
SDG
public class QuoteApplet extends JApplet
{
public void paint (Graphics appPage)
{
setBackground(Color.YELLOW);
appPage.drawRect(65,55,255,100);
//page.drawRect(60,80,225,30);
//page.drawOval(75,65, 20, 20);
appPage.drawLine(30,30,30,100);
appPage.drawLine(40,30,40,100);
appPage.drawLine(55,45,15,85);
appPage.drawString("There once lived a man named Oedipus Rex.", 70, 70);
appPage.drawString("You may have heard about his odd complex.", 70, 90);
appPage.drawString("His name appears in Freud's index,", 70, 110);
appPage.drawString("'cause he loved his mother.", 70, 130);
appPage.drawString("-Tom Lehrer", 200, 150);
}
}