• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing system event queue through applets

 
Tanveer Rameez
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I am working on a project where I have to generate customized events and send them to the system event queue and then process them.I have taken the help of ' Core Java 2 Fundamentals(vol-1) ' by Horstmann & Cornell from sun Microsystem press.Some examples are given in the event handling chapter.
here is a sample code:
when we need to generate an event,
[code]
EventQueue evtq=Toolkit.getToolkit().getSystemEventQueue();
MyEvent me=new MyEvent(this);
evtq=postEvent(me);
[code]
Then I write the processevent(AWTEvent method) to handle the event and send it to the listeners.
This works fine with frame based applications. However when I use this in an applet, I get exceptions in the java console. The book says that you cannot access system event queue thru an applet.
But I think by using trusted applets, this problem can be solved.Please tell he how to make applets trusted(also suggest books,sites) in such a way that the system event queue can be accessed. The applets should not only run in the intranet but also in internet.How do I get the third party certificates to make the applets trusted?
hoping to get positive responses from all the java gurus from all over the world
regards
Tanveer
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic