I am a beginner at programming. I am creating a keyboard which looks like a traditional T9 Keyboard. I am able to print the letters on display but I have few bugs right now. I cannot print a specific character with the number of times the key has been pressed
here is my code, any kind of help is appreciated. Thanks
public int count = 0;
@FXML
private void handleButtonActionPQ(ActionEvent event) {
count = count + 1;
//key.btn1f();
System.out.println(count);
if(count <= 5 ){
switch(count){
case 1: display.appendText("p");
break;
case 2: display.appendText("q");
break;
case 3: display.appendText("x");
break;
case 4: display.appendText("y");
break;
case 5: display.appendText("z");
break;
default: display.appendText("p");
}
}
else if(count > 5){
count = 0;
}
}