import java.applet.Applet; import java.io.*; import java.awt.event.*; import java.awt.*; public class Kodutoo1 extends Applet implements ActionListener{ public void paint(Graphics g){ g.drawImage(Toolkit.getDefaultToolkit().getImage("Kylie.jpg"), 0, 0, getSize().width, getSize().height, this); } TextArea ta=new TextArea(10,55); TextField tf=new TextField("d:\\",10); public Kodutoo1(){ Panel p=new Panel(new BorderLayout()); p.add(tf, BorderLayout.NORTH); p.add(ta, BorderLayout.CENTER); setLayout(new BorderLayout()); add(p, BorderLayout.WEST); tf.addActionListener(this); } void trykiKataloog(String katalooginimi){ System.out.println("Sisenes kataloogi "+katalooginimi); String failid[]=new File(katalooginimi).list(); System.out.println("Sisenes kataloogi "+katalooginimi+", leiti "+failid.length); for(int i=0; i> "+fail.length()+" baiti."); ta.append(failinimi); ta.append(" >> "+fail.length()+" baiti\n"); } if(new File(failinimi).isDirectory()){ System.out.println("!!!Siseneb kataloogi "+failinimi); trykiKataloog(failinimi); } } } public void actionPerformed(ActionEvent e) { trykiKataloog(tf.getText()); System.out.println("valmis"); } public static void main(String argumendid[]){ Frame f=new Frame(); f.setSize(1024, 768); f.add(new Kodutoo1()); f.setBackground(new Color(255,255,255)); f.setVisible(true); } }