• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SystemEventQueue ?

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the ToolKit.getSystemEventQueue() .
You Can get the System EventQueue.

From their I can call the method EventQueue.push(EventQueue newEventQueue).

Will this kill all the threads in the old EventQueue.
Also it seems that using peek and other methods you could snoop on thing's you shouldn't have the ability to do. (Secrety risk)

Because all I want to beable to do. Is have the ablility to
provide a callback method to my interfaces. Like the way actionlistener and java built in actions do. I want to beable to post Myactions and all the implementing interfaces recieve the action
 
Ranch Hand
Posts: 225
Eclipse IDE Debian Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From reading the source, it looks like the Event Dispatch Thread for the original event queue will eventually end, once it has finished everything. Access to the event queue this way is a security risk, which is why getSystemEventQueue() checks for AWTPermission("accessEventQueue").

IMHO, it�s unlikely that you want to replace the AWT event queue to implement callbacks or events, though. All you need to dispatch events is something like javax.swing.event.EventListenerList, as used by javax.swing.Timer (source). The event queue doesn�t need to be involved at all.
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic