
Untitled
By: a guest on
Jul 15th, 2012 | syntax:
None | size: 0.76 KB | hits: 18 | expires: Never
Unable to set JApplet Background Color
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);
}
}