BUT2/DEV/DEV2.1/test/test_image_grille/Main.java

21 lines
535 B
Java
Raw Permalink Normal View History

2023-10-23 13:23:36 +02:00
import javax.swing.*;
import java.awt.*;
public class Main{
public static void main(String[] args){
System.out.println("Hello World !");
GridLayout grille = new GridLayout(3,3);
JFrame fenetre = new JFrame("SAE21_2022");
String chemin = new String("test.png");
fenetre.setLayout(grille);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenetre.setSize(500, 300);
fenetre.setLocation(0, 0);
for (int i = 0; i < 9; i++) {
fenetre.add(new testImage(chemin));
}
fenetre.setVisible(true);
}
}