Bonsoir,
J'aimerai bien savoir pourquoi éclipse n'accepte pas FEMME, PINK et BLUE ?
Il me met une erreur pour chacune d'entres elles :
FEMME cannot be resolved to a variable
PINK cannot be resolved to a variable
BLUE cannot be resolved to a variable
Merci pour vos réponse
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); Sexe sexe = (Sexe) value; setText(sexe.getLabel()); if (sexe == FEMME) { setForeground(PINK); } else { setForeground(BLUE); } return this; }
Partager