ActionListener and Timer

Hello,

please help me. I have a problem with a timer and the actionlistener. here is my code:

public String button2_action() {

ActionListener listener = new ActionListener(){

int count = 1;

public void actionPerformed(ActionEvent e){

count++;

String zwischena = String.valueOf(count);

zeitausgabe.setValue(zwischena);

if (count == 6){ //30 Sekunden

count = 0;

//bn_v_fzg_shDataProvider.refresh();

zeitausgabe.setValue("Timer abgelaufen");

//form1.discardSubmittedValues("save");

test(count);

Option[] clear = new Option[0];

getSessionBean1().setListOptions(clear);

timer.stop();

}

}

};

timer = new Timer(1000, listener);

timer.start();

return null;

}

The function actionPerformed does not set the new object variable in the sessoinbean. can someone help me?

[915 byte] By [malte] at [2007-11-26 6:10:06]
«« se3510
»» disk pack
# 1
Perhaps an exception is being thrown? You could use Creator's debugger and set a breakpoint in your actionPerformed method. Alternatively, I notice that there's a java.util.Timer (rather than javax.swing.Timer) that may be a better fit for web apps.
mbohm at 2007-7-6 13:42:59 > top of Java-index,Development Tools,Java Tools...