Results 1 to 2 of 2
- 07-27-2012, 07:39 AM #1
Member
- Join Date
- Jul 2012
- Posts
- 1
- Rep Power
- 0
Exception ..event dispatching: org.eclipse.swt.SWTException: Invalid thread access
Hi,
I was trying to invoke a Swing dialog from another Swing dialog ....with in SWT framework and I am getting the below exception. The code is below
public void mouseClicked(MouseEvent e) {
/*if (selectedIndex == 0) {
index1 = fillList.getSelectedIndex();
ActionInf selectedAction =
(ActionInf) fillList.getSelectedValue();
displayActionDialog(selectedAction, e);
} else*/
if (selectedIndex == 0) {
index2 = fillList1.getSelectedIndex();
ActionInf selectedAction =
(ActionInf) fillList1.getSelectedValue();
//Composite comp = new Composite(composite, SWT.None);
//Display.getDefault().asyncExec( new Runnable() { public void run() {new SWTActionInitializeDialog().createPartControl(comp osite); } });
new SWTActionInitializeDialog().createPartControl(comp osite);
//displayActionDialog(selectedAction, e);
} /*else if (selectedIndex == 2) {
index3 = fillList2.getSelectedIndex();
ActionInf selectedAction =
(ActionInf) fillList2.getSelectedValue();
displayActionDialog(selectedAction, e);
}
if (selectedIndex == 3) {
index4 = fillList3.getSelectedIndex();
ActionInf selectedAction =
(ActionInf) fillList3.getSelectedValue();
displayActionDialog(selectedAction, e);
}*/
}
}
Need help to resolve the below error.
Exception occurred during event dispatching:
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.SWT.error(SWT.java:3969)
at org.eclipse.swt.widgets.Widget.error(Widget.java:4 68)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget. java:359)
at org.eclipse.swt.widgets.Widget.checkParent(Widget. java:279)
at org.eclipse.swt.widgets.Widget.<init>(Widget.java: 149)
at org.eclipse.swt.widgets.Control.<init>(Control.jav a:108)
at org.eclipse.swt.widgets.Scrollable.<init>(Scrollab le.java:75)
at org.eclipse.swt.widgets.Composite.<init>(Composite .java:95)
at com.bpms.workbench.studio.actions.SWTActionInitial izeDialog.createPartControl(SWTActionInitializeDia log.java:21)
at com.bpms.workbench.studio.figures.TaskDialog$MyLis tSelectionListener.mouseClicked(TaskDialog.java:31 84)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
- 07-27-2012, 11:10 AM #2
Re: Exception ..event dispatching: org.eclipse.swt.SWTException: Invalid thread acces
Moved from AWT/Swing since the question pertains to SWTException.
I don't use SWT, but you probably shouldn't be mixing toolkits.
Also, go through these:
Forum Rules
http://www.java-forums.org/forum-gui...w-members.html
BB Code List - Java Programming Forum
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
Similar Threads
-
invalid thread access in eclipse Webnms
By saifjunaid in forum Web FrameworksReplies: 0Last Post: 06-13-2011, 01:45 PM -
invalid thread access in eclipse
By saifjunaid in forum EclipseReplies: 0Last Post: 06-09-2011, 01:59 PM -
org.eclipse.swt.SWTException: Invalid thread access
By int80 in forum New To JavaReplies: 2Last Post: 08-14-2009, 11:16 AM -
getting following error org.eclipse.swt.SWTException: Invalid thread access
By Madhavee Latha in forum SWT / JFaceReplies: 1Last Post: 03-24-2009, 01:52 PM -
JBoss and Java 6:Exception occurred during event dispatching
By Ed in forum Advanced JavaReplies: 2Last Post: 07-04-2007, 06:23 AM
Bookmarks