• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 22862
132
Eclipse IDE Spring TypeScript Quarkus Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben,

Please read your private messages.

You might want to check this thread: https://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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic