Do you know that initial Pokemon conversation?
"Welcome to the pokemon world" - ENTER
"Are you a girl or a boy?" -ENTER
CONTINUE ....
So, I'm trying to do one through Java swing, at the moment it looks like this:
private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
jLabel1.setText(mudarTexto());
//i++;
}
public String mudarTexto(){
//jTexto.setText("Olá,bem vindo ao mundo pokémon");
int i = 0;
switch(i){
case 0:
c ="oi";
case 1:
c = "Olá,bem vindo ao mundo pokémon";
case 2:
c = "Você é garoto ou garota?";
case 3:
c = "aa";
default:
c = "c";
}
return c ;
}
But switch
does not read my i
as zero, it only starts the last switch statement that in the case is default, if the last one was case 3, then it would be printed, how can I solve this problem ?