import java.awt.*;
import java.applet.*;
/*
<applet code="Fontlist" height=1000 width=190 ></applet>*/
public class Fontlist extends Applet {
private String[] availableFonts;
public void init () {
Toolkit t = Toolkit.getDefaultToolkit();
availableFonts = t.getFontList();
}
public void paint(Graphics g) {
for (int i = 0; i < availableFonts.length; i++) {
g.drawString(availableFonts[i], 5, 15*(i+1));
}
}
}
import java.applet.*;
/*
<applet code="Fontlist" height=1000 width=190 ></applet>*/
public class Fontlist extends Applet {
private String[] availableFonts;
public void init () {
Toolkit t = Toolkit.getDefaultToolkit();
availableFonts = t.getFontList();
}
public void paint(Graphics g) {
for (int i = 0; i < availableFonts.length; i++) {
g.drawString(availableFonts[i], 5, 15*(i+1));
}
}
}
Comments