Reputation: 279
Hi i'd like to do a task out of the EDT :
new Thread(new Runnable(){
@Override
public void run() {
// TODO Auto-generated method stub
fBPC.repaint();
System.out.println("toto");
if (SwingUtilities.isEventDispatchThread()){
System.out.println("titi");
}
}
}).run();
It display that:
toto
titi
Am i not supposed to get only : "toto" because i created a new Thread ?
If not please explain me how to make things in a thread ou of the EDT.
Thank you for helping.
Upvotes: 3
Views: 98