i want to print the contents of an array of strings inside an applet as a list, but nothing appears when the applet starts, only something appears and it seems to be the strings inside the array but they need a space between each other, here's the applet:
import java.applet.Applet;
import java.awt.*;
import java.net.*;
import java.io.*;
import javax.swing.JFrame;
public class FontApplet extends Applet{
String[] fonts;
public void init() {
fonts =GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
}
public void update(Graphics g){paint(g);}
public void paint(Graphics g) {
for(String str:fonts)
g.drawString(str, 100, 125);
}
}