22 lines
557 B
Java
22 lines
557 B
Java
|
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){}
|
||
|
}
|
||
|
}
|