2023-04-27 11:27:11 +02:00
|
|
|
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");
|
2023-05-09 11:26:45 +02:00
|
|
|
BufferedInputStream file2 = new BufferedInputStream(file);
|
2023-04-27 11:27:11 +02:00
|
|
|
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();
|
2023-05-09 11:26:45 +02:00
|
|
|
file2.close();
|
2023-04-27 11:27:11 +02:00
|
|
|
} catch(IOException e){}
|
|
|
|
}catch(FileNotFoundException e){}
|
|
|
|
}
|
|
|
|
}
|