Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] Cannot use a widget of father thread in a son thread.

I think Display.asyncExec or Display.syncExec could achieve what you needed.

 

 


From: platform-swt-dev-admin@xxxxxxxxxxx [mailto:platform-swt-dev-admin@xxxxxxxxxxx] On Behalf Of tinawang
Sent: Thursday, October 21, 2004 12:48 PM
To: platform-swt-dev
Subject: [platform-swt-dev] Cannot use a widget of father thread in a son thread.

 

Hi all,
       My issue is as follow:

       public class fatherThread{
        ...
       public Label la;
        ...
       public void init()
     {
          ...
          la=new Label(cp,SWT.NONE);  //cp is a composite instance
          ..
     }
      ....
      class TransThread extends Thread
      {
           public TransThread() {
          }
        public void run() {
            la.setText("done...");
        }
      }
}
  I got a exception , how could I use a widget from a son thread??

Regards
-Tina


Back to the top