0
How to disable a button in java
so i need a button to be unusable once the timer runs out and until the amount is reset, how do i do this? @override public void onFinish(){ timer.setText("0:00"); txtView2.setText("you're out of time"); } im assuming i add the code in this class but i dont know what i would need to input
1 Antwort
+ 1
there is method in java which is buttonname.setEnabled(boolean); in that if you want to enable the button then write true in the place of boolean and if you disable the button then write false in the place of boolean