import java.applet.Applet;
import java.awt.*;
import java.io.*;
import java.net.URL;

public class core extends Applet implements Runnable
{
  BufferedInputStream bis;
  DataInputStream dataIn;
  InputStream in;
  Font[] fonts = new Font[72];
  Image img = null;
  Graphics imgG =  null;
  String word = null;
  int num = 0;
  Thread t = null;

    public void init()
    {
        setBackground(Color.black);
	for(int i=8;i<40;i++){
		fonts[i-8] = new Font("Helvetica",Font.PLAIN,i);
        }
	img =  createImage(300,50);
        imgG = img.getGraphics();
    }

    public void paint(Graphics g)
    {
	if(imgG!=null){
	   imgG.setColor(Color.black);
	   imgG.fillRect(0,0,300,100);
           imgG.setColor(Color.white);
	   imgG.drawString(word,10,num);
	}
	g.drawImage(img,0,0,null);
    }
  
    public void start(){
	t = new Thread(this);
	t.start();
    }
    public void stop(){
	if(t !=null) t.stop();
	t=null;
    }
    public void run()
    {
       try
       {
            URL url = new URL(getCodeBase(),"core.txt");
            in = url.openStream();
            bis = new BufferedInputStream(in);
            dataIn = new DataInputStream(bis);
            while(t!=null && (word = dataIn.readLine())!=null){
	      for(int i=0;i<32;i++){
	        imgG.setFont(fonts[num]);
		num++;	
		repaint();
	        t.sleep(50);
	      }
	      num=0;
           }
       }
       catch(Throwable ex)
       {
            System.out.println("Error in opening file");
       }
       return;
    }

}
