UI elements in a User Interface will not respond to the user while execution if a thread is not implemented. Here I will explain how to create a thread so that User Interface will keep responding to the user even when the execution is happening.
Create a class outside the Jframe class
Call the Thread from any actionlistener like below
Create a class outside the Jframe class
class Multi3 implements Runnable{
public void run(){
Url url= new Url();
url.openurl(javaframe.textField.getText());
}
}
Call the Thread from any actionlistener like below
Multi3 m1=new Multi3();
Thread t1 =new Thread(m1);
t1.start();





