register
This commit is contained in:
parent
e1e3ebf602
commit
41e673939b
Binary file not shown.
Binary file not shown.
BIN
Grilles.class
BIN
Grilles.class
Binary file not shown.
BIN
Lecteur.class
Normal file
BIN
Lecteur.class
Normal file
Binary file not shown.
45
Lecteur.java
Normal file
45
Lecteur.java
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.io.*;
|
||||||
|
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||||
|
|
||||||
|
public class Lecteur{
|
||||||
|
public static void lecture(String name, int [][] g) {
|
||||||
|
|
||||||
|
int valeur[] = new int[9];
|
||||||
|
int valeur_en_fin[][]= new int[9][9];
|
||||||
|
|
||||||
|
int valeur_actuelle=0;
|
||||||
|
|
||||||
|
try{
|
||||||
|
FileInputStream fichier = new FileInputStream(name);
|
||||||
|
DataInputStream flux = new DataInputStream(fichier);
|
||||||
|
|
||||||
|
try{
|
||||||
|
for(int i=0; i<9; i++){
|
||||||
|
valeur[i]=flux.readInt();
|
||||||
|
System.out.print(valeur[i]);
|
||||||
|
}
|
||||||
|
flux.close();
|
||||||
|
}catch(IOException e){
|
||||||
|
System.out.println("Lecture fichier impossible");
|
||||||
|
}
|
||||||
|
}catch(FileNotFoundException e){
|
||||||
|
System.out.println("Fichier non trouvé");
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i=0; i<9; i++){
|
||||||
|
for(int j=8; j>=0; j--){
|
||||||
|
valeur_actuelle=valeur[i];
|
||||||
|
|
||||||
|
valeur_actuelle=valeur_actuelle%10;
|
||||||
|
valeur[i]=(valeur[i]-valeur_actuelle)/10;
|
||||||
|
|
||||||
|
valeur_en_fin[i][j]=valeur_actuelle;
|
||||||
|
System.out.print(valeur_actuelle);
|
||||||
|
g[i][j] = valeur_actuelle;
|
||||||
|
}
|
||||||
|
valeur_actuelle=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
Main$1.class
BIN
Main$1.class
Binary file not shown.
BIN
Main$2.class
BIN
Main$2.class
Binary file not shown.
BIN
Main$3.class
BIN
Main$3.class
Binary file not shown.
BIN
Main.class
BIN
Main.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -55,7 +55,8 @@ public class MainCreation {
|
|||||||
JPanel panneau = new JPanel();
|
JPanel panneau = new JPanel();
|
||||||
int valeur_de_retour = fichier.showOpenDialog(panneau);
|
int valeur_de_retour = fichier.showOpenDialog(panneau);
|
||||||
if(valeur_de_retour == JFileChooser.APPROVE_OPTION) {
|
if(valeur_de_retour == JFileChooser.APPROVE_OPTION) {
|
||||||
//Grilles.grilleExiste(fichier.getSelectedFile().getName());
|
Lecteur.lecture(fichier.getSelectedFile().getName(), grille);
|
||||||
|
fenetreModification(grille);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Binary file not shown.
BIN
Register.class
BIN
Register.class
Binary file not shown.
Binary file not shown.
BIN
Resolveur.class
BIN
Resolveur.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user