SWT_AWT Popup menu problem [message #327969] |
Sat, 10 May 2008 18:19 |
Eclipse User |
|
|
|
Originally posted by: asf14.yahoo.com
Hi
I've been stuck on this problem for a while. I am writing an graph
editor using jgraph as an eclipse editor plugin. I use SWT_AWT.newFrame
to attach the swing component onto eclipse. My problem now is how to
implement popup menus associated with mouse clicks.
When I simply create a SWT menu when a mouse right click occurs, I get a
org.eclipse.swt.SWTException: Invalid thread access.
I tried to pass the composite from the SWT_AWT.newFrame(composite) and run
composite.getShell().getDisplay().syncExec( new Runnable() {
public void run(){
Menu menu = new Menu(composite.getShell());
etc etc
}
}
I still get a thread error msg
Does anyone know how to approach this problem ?
Any help will be greatly appreciated,
David
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02935 seconds