final String MESSAGE = newLine;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
jTextArea1.setText(Log.now() + ": " + MESSAGE + "\n" + jTextArea1.getText());
jTextArea1.setCaretPosition(0);
}
});
I added a second thread and some Thread.sleep(10);'s between actions to give time for GUI thread to do its job. Unfortunately this gave me nothing. You have to create a Thread class:
public class CloneThread implements Runnable{
private int index;
private VMCloneInfo vmClInfo;
public CloneThread(int index, VMCloneInfo vmClInfo) {
this.index = index;
this.vmClInfo = vmClInfo;
}
public void run() {
VBoxClonerView.getVBoxClonerView().cloneVM(index, vmClInfo);
}
}
and use ExecutorService. This is the key element for all this to work.
ExecutorService myExecutor = Executors.newCachedThreadPool();
myExecutor.execute((Runnable) new CloneThread(jComboBox1.getSelectedIndex(), vmCloneInfo));
Ecorptrainings.com provides JAVA SWING in hyderabad with best faculties on real time projects. We give the best online trainingamong the JAVA SWING in Hyderabad. Classroom Training in Hyderabad India
ReplyDeleteI would like to appreciate your work for good accuracy and got informative knowledge from here................Please contact us for Oracle Fusion Financials training details in our Erptree Training Institute
ReplyDeleteThe strategy you have posted on this technology helped me to get into the next level and had lot of information in it. please keep blogging...
ReplyDeleteTableau Training In Hyderabad
Data science Training in Hyderabad
WordPress training in Hyderabad will help you develop your live website in just 15 Days.
ReplyDeleteThis is the good website and also i love this website https://sclinbio.com
ReplyDelete