DEV/DEV2.1/TP9:FluxOctets/MainImage.java

22 lines
557 B
Java
Raw Normal View History

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");
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();
file.close();
} catch(IOException e){}
}catch(FileNotFoundException e){}
}
}