In your switch statement, replace every return;
with break;
which is the signal to break out of the switch, but the rest of the code will run. When you write return
within a void method, when its reached it means you are breaking out of the method itself so no code past it will be read. In this case, if your switch cases match, you will never reach the setText
method.
solved The value x assigned to y is never used in a switch statement?