From eece18a05895011d627a82cc41d27ac4b303ce0e Mon Sep 17 00:00:00 2001 From: fauvet Date: Wed, 19 Apr 2023 00:13:00 +0200 Subject: [PATCH] =?UTF-8?q?UPDATE=2013=20-=20Correction=20de=20l'affichage?= =?UTF-8?q?=20import=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FenetreImpGrille.java | 4 ++-- Lecture.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/FenetreImpGrille.java b/FenetreImpGrille.java index 8fcfbfb..82b5f30 100644 --- a/FenetreImpGrille.java +++ b/FenetreImpGrille.java @@ -44,10 +44,10 @@ public class FenetreImpGrille extends Fenetre { JPanel ce_pannel = new JPanel(); - if((i*4+j)==(Lentre*4+Centre)){ + if((i*Taille+j)==(Lentre*Taille+Centre)){ ce_pannel.setBackground(Color.RED); this.fenetre.add(ce_pannel); - } else if((i*4+j)==(Lortie*4+Cortie)){ + } else if((i*Taille+j)==(Lortie*Taille+Cortie)){ ce_pannel.setBackground(Color.BLUE); this.fenetre.add(ce_pannel); } else if(ce_double_tab[i][j] == 1){ diff --git a/Lecture.java b/Lecture.java index c41bf9c..ef84215 100644 --- a/Lecture.java +++ b/Lecture.java @@ -80,6 +80,7 @@ public class Lecture { while(data != -1){ this.data = fis.read(); + ce_tableau[ce_compteur]=this.data; ce_compteur=ce_compteur+1; } @@ -95,6 +96,7 @@ public class Lecture { for(int n=0; n<8; n++){ //repetition 8 fois pour traiter les 8 bits ce_tableau_temp[n] = temp&1; + System.out.println("la bit vaut : "+ce_tableau_temp[n]); temp = temp >> 1; }