import java.io.*;
import javax.swing.*;

public class CopyBytes extends JFrame{

	JTextArea ta;
	String str="";	
	
	public CopyBytes()
	{
		ta = new JTextArea();
		ta.setEditable(false);
		JScrollPane jp = new JScrollPane(ta);

		writeTA();
		ta.setText(str);
	
		getContentPane().add(jp);		
		setVisible(true);
		pack();		
	}
	

	public void writeTA()
	{
		try{
        	File inputFile = new File("CopyBytes.java");
	        
	
	        FileInputStream in = new FileInputStream(inputFile);
	        int c;
			
	        while ((c = in.read()) != -1)
	        	str += (char)c;
			
	        in.close();
	   }catch(Exception e){}
	   		
	}
	
    public static void main(String[] args) throws IOException {
    	new CopyBytes();
    }
}

