as the title implies I do not know how there could be three threads in my program?
My suggestion is:
(1) main-Thread
(2) EDT (because of JButton)
(3) ????
Here is my Code (it is very simple):
package newProject;
import javax.swing.JButton;
public class MyExample {
public static void main(String[] args) {
System.out.println(Thread.activeCount() + " " + Thread.currentThread());
MyThread myExample = new MyThread();
System.out.println(Thread.activeCount() + " " + Thread.currentThread());
}
}
class MyThread {
JButton button=new JButton();
public MyThread() {
}
}