correction bug programme 2
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
+8
-8
@@ -65,12 +65,12 @@ public class grille extends JComponent{
|
|||||||
case_modifiable[ligne][col] = new JTextField("", 1);
|
case_modifiable[ligne][col] = new JTextField("", 1);
|
||||||
case_modifiable[ligne][col].setFont(new Font("Arial", Font.PLAIN, 30));
|
case_modifiable[ligne][col].setFont(new Font("Arial", Font.PLAIN, 30));
|
||||||
case_modifiable[ligne][col].setHorizontalAlignment(JTextField.CENTER);
|
case_modifiable[ligne][col].setHorizontalAlignment(JTextField.CENTER);
|
||||||
if ((ligne % 3 == 0) && (ligne != 0)){
|
if ((ligne % 3 == 0) && (ligne != 0) && (col % 3 == 0) && (col != 0)){
|
||||||
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(5,2,2,2,Color.BLACK));
|
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(5,5,2,2,Color.BLACK));
|
||||||
} else if ((col % 3 == 0) && (col != 0)){
|
} else if ((col % 3 == 0) && (col != 0)){
|
||||||
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(2,5,2,2,Color.BLACK));
|
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(2,5,2,2,Color.BLACK));
|
||||||
} else if ((ligne % 3 == 0) && (ligne != 0) && (col % 3 == 0) && (col != 0)){
|
} else if ((ligne % 3 == 0) && (ligne != 0)){
|
||||||
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(5,5,2,2,Color.BLACK));
|
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(5,2,2,2,Color.BLACK));
|
||||||
}else {
|
}else {
|
||||||
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(2,2,2,2,Color.BLACK));
|
case_modifiable[ligne][col].setBorder(BorderFactory.createMatteBorder(2,2,2,2,Color.BLACK));
|
||||||
}
|
}
|
||||||
@@ -79,12 +79,12 @@ public class grille extends JComponent{
|
|||||||
case_depart[ligne][col] = new JLabel(String.valueOf(grid_values[ligne][col]));
|
case_depart[ligne][col] = new JLabel(String.valueOf(grid_values[ligne][col]));
|
||||||
case_depart[ligne][col].setFont(new Font("Arial", Font.PLAIN, 30));
|
case_depart[ligne][col].setFont(new Font("Arial", Font.PLAIN, 30));
|
||||||
case_depart[ligne][col].setHorizontalAlignment(JTextField.CENTER);
|
case_depart[ligne][col].setHorizontalAlignment(JTextField.CENTER);
|
||||||
if ((ligne % 3 == 0) && (ligne != 0)){
|
if ((ligne % 3 == 0) && (ligne != 0) && (col % 3 == 0) && (col != 0)){
|
||||||
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(5,2,2,2,Color.BLACK));
|
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(5,5,2,2,Color.BLACK));
|
||||||
} else if ((col % 3 == 0) && (col != 0)){
|
} else if ((col % 3 == 0) && (col != 0)){
|
||||||
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(2,5,2,2,Color.BLACK));
|
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(2,5,2,2,Color.BLACK));
|
||||||
} else if ((ligne % 3 == 0) && (ligne != 0) && (col % 3 == 0) && (col != 0)){
|
} else if ((ligne % 3 == 0) && (ligne != 0)){
|
||||||
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(5,5,2,2,Color.BLACK));
|
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(5,2,2,2,Color.BLACK));
|
||||||
} else {
|
} else {
|
||||||
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(2,2,2,2,Color.BLACK));
|
case_depart[ligne][col].setBorder(BorderFactory.createMatteBorder(2,2,2,2,Color.BLACK));
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user