import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; public class Veebilugemine extends Applet implements ActionListener{ TextField tf=new TextField("http://",80); TextArea ta=new TextArea(30, 60); TextField tf2=new TextField(50); TextField tf3=new TextField(50); Label silt1, silt2, silt3; public Veebilugemine(){ setLayout(new BorderLayout()); Panel p=new Panel(new GridLayout(2, 1)); p.add(silt1=new Label("Sisesta URL:")); p.add(tf); tf.addActionListener(this); add(p, BorderLayout.NORTH); Panel p2=new Panel(); p2.add(ta); ta.setEditable(false); add(p2, BorderLayout.CENTER); Panel p3=new Panel(new GridLayout(1, 4)); p3.add(silt2=new Label("Ridade arv:")); p3.add(tf2); p3.add(silt3=new Label("Piltide arv:")); p3.add(tf3); add(p3, BorderLayout.SOUTH); } public void actionPerformed(ActionEvent e){ int i=0; int img=0; int ridu=0; try{ String aadress=tf.getText(); BufferedReader sisse=new BufferedReader( new InputStreamReader(new URL(aadress).openStream()) ); String rida=sisse.readLine(); PrintWriter valja=new PrintWriter( new FileWriter("Veebilugemine.html") ); while(rida!=null){ ridu=ridu+1; valja.println(rida); for(i=0;i