By arranging to call decrementPosition
at regular intervals, you can
ensure that the message will scroll from right to left.
Accordingly, you need to define a subclass of the Thread
classsay
MarqueeThread
that runs independently, and that calls
decrementPosition
, with the component as the target, at regular
intervals.