can we control a timer per second process..? i mean.. if i set a timer.setDelay in 1000 milliseconds.. then in the first second it will out "hi" and the second tick of the timer it will say "hello" and so forth...

can u help me guys how to do it..

im experimenting interfacing with steppermotor..

Thanks guyzz..

ur such a great friend

Is this the timer in swing or util?

If swing then you just need to place an if-else in the actionPerformed method that the timer is firing.

I'd use a circular (or random) iterator for the actions that you need to take place during calls to the actionPerformed method.