These are applets that I have written. All of them are
educational applets which I have wrtten while attending
Northland College.
This Program will diplay the alphabet from A to Z.
import java.awt.*;
import java.applet.*;
public class ABC extends Applet
{
public void paint(Graphics g){
int x=5;
char letter;
for (letter='A' ; letter <='Z';letter++,x+=10)
g.drawString("Letter " + letter,25,x);
}
}
This program Font.java will display information about
Font. The Imformation include Family, Size, and Style
you are currently using.
import java.applet.*;
public class Font extends Applet {
public void paint(Graphics g) {
Font f = g.getFont();
String fontName = f.getName();
String fontFamily = f.getFamily();
int fontSize = f.getSize();
int fontStyle = f.getStyle();
String msg = "Family: " + fontName;
msg += ", Font: " + fontFamily;
msg += ", Size: " + fontSize + ", Style: ";
if((fontStyle & Font.BOLD) == Font.BOLD)
msg += "Bold ";
if((fontStyle & Font.ITALIC) == Font.ITALIC)
msg += "Italic ";
if((fontStyle & Font.PLAIN) == Font.PLAIN)
msg += "Plain ";
g.drawString(msg, 4, 16);
}
}
Most graphics and all contents copyrighted by Steve Trieu(TrueCrow).
If you would like anything please feel free to contact me at [email protected].