This commit is contained in:
2023-10-23 13:23:36 +02:00
parent 667dae6f1a
commit 322b22f9bf
5711 changed files with 72953 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,20 @@
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);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

View File

@@ -0,0 +1,15 @@
import javax.swing.JComponent;
import java.awt.*;
public class testImage extends JComponent {
Image image;
public testImage(String cheminImage){
this.image = Toolkit.getDefaultToolkit().getImage(cheminImage);
}
@Override
protected void paintComponent(Graphics pinceau) {
Graphics secondPinceau = pinceau.create();
secondPinceau.drawImage(this.image,0, 0, this.getWidth(), this.getHeight(), this);
}
}