title: Java - how post event to UI thread or call a function of UI thread?
body: <p>I have a java code that looks like this:</p>
  
  <pre><code>//UI thread
  //Some code
  Job j = new Job(jobName) {
  
  @Override
  public IStatus run(IProgressMonitor monitor) {
  try {
                      //Some code
                      SomeFunc();
                      //Some code
                      return Status.OK_STATUS;
  
      } catch(Exception e) {
      }
      finally {
      }
  }
  };
  j.schedule();
  </code></pre>
  
  <p>The problem is that the <code>SomeFunc();</code> must be called from the UI thread.</p>
  
  <p>I'm new to java, so can you please help me with showing the best methods for posting event to UI thread or calling a function of UI thread?</p>