• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Exception in thread "AWT-EventQueue-0" org.eclipse.swt.SWTException: Invalid thread access  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

For my application I have created a menu in the system tray. When you click left you get some dynamic data and when you click right on my menu you get a screen to add a new dynamic menuitem to my system tray menu. but when I try to add something to that menu I get this error:

Exception in thread "AWT-EventQueue-0" org.eclipse.swt.SWTException: Invalid thread access


this is my code:


When you run this, you see a nice menu in the system tray..
add some text in the screen that popup and click on save.. now you see the error.. (In this example ill trie to change the staic menu into a dynamic one)
 
Sheriff
Posts: 21503
96
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,

Please read your private messages.

You might want to check this thread: http://www.coderanch.com/t/430935/Swing-AWT-SWT-JFace/java/Getting-SWTException-Invalid-thread-access
 
Fictus De la Pjedero
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I've followed your link and I found some example code, but I do not quite understand why it's not working..

Sample code:



If you run this, you will see that "I came here (2nd run)" is not printed..
Can anybody explain why that is and how you can make it run..

(i've tried to implemented it into my code and found out that my menu code is not fired :



So I've come from one proble into another one..

(but I still want to see the first one to be solved: Exception in thread "AWT-EventQueue-0" org.eclipse.swt.SWTException: Invalid thread access exception)
 
Fictus De la Pjedero
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!