jslider hammers my serial port

I'm trying to use a slider to send bytes over a serial port.

It sends data too fast. I use wait(n) to block an xmit method called by the slider event handler, and notifyAll() to re-enable transmission alright, but the nasty slider seems to cache some data before the method blocks, then continue to transmit.

How do I slow its firing?

Thanks!

[368 byte] By [Javidiusa] at [2007-11-27 10:44:51]
# 1

Some example code would have been nice

But hear is my two cents: Do know how you are sending the data but you could use a buffer strategy and instead of letting the slider function send the data directly, you could store it in some Vector (or Collection) and send it later using a Timer or some thread.

ICE

icewalker2ga at 2007-7-28 20:09:29 > top of Java-index,Desktop,Core GUI APIs...