Disclaimer: I\'m not using my program for anything malicious, even though it\'s name is Spambot. I\'m only using it for practice.
Edit: My problem is th
I think it is important that you understand that your program logic and GUI
should never be run on the same thread at all. When your program is busy preforming tasks you do not want your GUI
to freeze up. The way Java
solves this is the Event Dispatch Thread
(EDT).
You do this like so:
public static void main(String args[]) {
EventQueue.invokeLater(new Runnable() {
public void run() {
//Your GUI code here
}
});
}
More info on the EDT here: https://docs.oracle.com/javase/tutorial/uiswing/concurrency/dispatch.html