public Constructor(){
view.showStates(view.startState); //Here calling the method to initialize Interface with Start State( Is working)
timer = new Timer(2000, states);
timer.start();
}
ActionListener states = new ActionListener(){
public void actionPerformed(ActionEvent arg0) {
if(i++%2 == 0){
System.out.println("Start state"); //Is printed out
view.showStates(view.startState); //Not working
}
else{
System.out.println("End state"); // Is printed out
view.showStates(view.endState); //Not working
}
}
};
Any idea?
Thank you
toto7


Sign In
Create Account


Back to top









