I'm trying to put a sort of punctuation counter on an ex Jlabel: you hit an issue the score goes to 1, you miss and nothing happens with the punctuation.
I tried to do it this way:
private void confirmarActionPerformed(java.awt.event.ActionEvent evt) {
while (true){
String pont = " ";
int pontuacao = Integer.parseInt(pont);
if (confirmar == a){
a.setBackground(Color.green);
}else{
a.setBackground(Color.red);
}
}
}
Error:
Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: ""