Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • 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
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,
EventQueue evtq=Toolkit.getToolkit().getSystemEventQueue();
MyEvent me=new MyEvent(this);
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
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!