Moderator: roger
class ButtonExit extends ButtonListener{
public boolean isrunpressed=false;
void buttonPressed(Button b) {
if(b.equals(Button.RUN))
isrunpressed=true;
}
void buttonReleased(Button b){}
}
//code here
ButtonExit be=new ButtonExit();
Button.RUN.addButtonListener( be );
while(!be.isrunpressed){}
//end of main method
}Users browsing this forum: No registered users and 2 guests