Suppose that we need to change the position of a Swing item (JCheckBox for example) from the position : (0,0,70,25) to (100,0,70,25).
Usually i do : MyBox.setBounds(100,0,60,25);
... And the Box then is moved to the new posiyion IN ZERO SECONDS.
... But, what if we need it to go to the new position continuously TAKING 1 SECONDE or more ??!
(i.e. we need it to move continuously starting from (0,0,70,25) and arriving to (100,0,70,25) in a trip taking 1 second or more)
Same Question for many other Actions like Changing a Panel Size, Changing a Label Color and so ...
i have a general idea that we have to use something like Threads or others may be !? but i need a very simple example showing how to do that in a very simple and quick code...
Many thanks for any help.
Re: Using time