This commit is contained in:
Simoes Lukas
2025-03-27 13:35:54 +01:00
parent 376861b608
commit fe693705bf
90 changed files with 1188 additions and 24 deletions

BIN
DEV2.1/Sudoku/Case.class Normal file

Binary file not shown.

26
DEV2.1/Sudoku/Case.java Normal file
View File

@@ -0,0 +1,26 @@
import java.awt.*;
import javax.swing.*;
public class Case extends JComponent {
@Override
public void paintComponent(Graphics pinceau) {
Graphics secondPinceau = pinceau.create();
if (this.isOpaque()) {
secondPinceau.setColor(this.getBackground());
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
}
secondPinceau.setColor(Color.BLACK);
secondPinceau.drawRect(0, 0, this.getWidth()-3, this.getHeight()-3);
secondPinceau.drawRect(1, 1, this.getWidth()-4, this.getHeight()-4);
secondPinceau.drawRect(2, 2, this.getWidth()-5, this.getHeight()-5);
for (int i = 0; i != 3; i++) {
for (int j = 0; j != 3; j++) {
secondPinceau.drawRect(this.getWidth()*i/3, this.getHeight()*j/3, this.getWidth()/3, this.getHeight()/3);
}
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,17 @@
import java.awt.*;
import javax.swing.*;
public class Graphique extends JFrame {
public Graphique() {
this.setSize(600, 600);
this.setLocation(100, 100);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLayout(new GridLayout(9, 9));
for (int i = 0; i != 81; i++) {
this.add(new JTextField());
}
}
}

BIN
DEV2.1/Sudoku/Main.class Normal file

Binary file not shown.

6
DEV2.1/Sudoku/Main.java Normal file
View File

@@ -0,0 +1,6 @@
public class Main {
public static void main(String[] args) {
Graphique fenetre = new Graphique();
fenetre.setVisible(true);
}
}