I want to show movement of label for a while on pressing of button. Please help. Just tell me how I pause the process for a while during the changing of setBounds, in this case sleep method pauses the process but just last setBound statement executes only:
void ActionPerformed(..){
Thread b = new Thread();
try{
label.setBounds(100,150,70,70);
b.sleep(1000);
label.setBounds(100,200,70,70);
b.sleep(1000);
label.setBounds(100,150,70,70);
}catch(InterruptedException e){
e.printStackTrace();
}
}