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

public class MainImage{

	public static void main(String[] args) {
		try{
			FileInputStream file = new FileInputStream("image.bin");
			BufferedInputStream file2 = new BufferedInputStream(file);
			try {
				JFrame fenetre = new JFrame();
				fenetre.setSize(1024, 768);
    			fenetre.setLocation(0, 0);
    			fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    			fenetre.add(new Imag(1024, 768, "image.bin"));
				fenetre.setVisible(true);
				fenetre.pack();
				file2.close();
			} catch(IOException e){}
		}catch(FileNotFoundException e){}
	}
}