An Improved Applet
. . . it also reads the file again whenever the page is refreshed:
public class FileDisplay extends JApplet {
. . .
public void start() {
try {
panel.setLines(server.readFile(getParameter(“file”))) ;
} catch(Exception e) { . . . }
}
}
We added a default constructor and setLines() method to FilePanel(). Latter uses setListData() method of JList.