/*
Lab notes for A112.
AI: Francisco Lara-Dammer
Goals: 1. To learn how to run an applet.
2. To get a brief introduction to java.
*/
import java.applet.Applet;
import java.awt.*;
public class Hello2 extends Applet{
//In this declaration we are creating a new object belonging to tha class
//Font. The object f is a font whose name is "TimesRoman", its style is
//BOLD, and its size is 36.
Font f = new Font("TimesRoman", Font.BOLD, 36);
public void paint (Graphics g){
//A method defined in the th Graphics class to set the font.
g.setFont(f);
//A method defined in the th Graphics class to set the color.
g.setColor(Color.red);
/*
50, 50 means the point (50, 50) (in pixels).
This means starting on the upper left corner and "walkin g" 50 pixels to the right" and 50 pixels down.
*/
g.drawString("Hello", 50, 50);
/*
Check where we are going to writte
*/
g.drawString("and welcome to A112", 50, 80);
}
}