super("FileViewer: " + filename);
File f = new File(filename);
int size = (int) f.length();
int bytes_read = 0;
FileInputStream in = new FileInputStream(f);
byte[] data = new byte[size];
while(bytes_read < size)
bytes_read += in.read(data, bytes_read, size-bytes_read);
TextArea textarea = new TextArea(new String(data, 0), 24, 80);
textarea.setFont(new Font("Helvetica", Font.PLAIN, 12));
textarea.setEditable(false);
this.add("Center", textarea);
close = new Button("Close");
this.add("South", close);
this.pack();
this.show();