This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to find applet execution is completed

 
Abhijeet Bhatambrekar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am calling applet from one jsp which gets opened after calling window.open() function. This applet prints the certain data on a printer. porblem is that whenever user focuses control on this applet, printer gets started to print the data. how can i avoid this? or onece printer gets started for printing the data, this popup should get closed. how can i achieve this?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

It sounds as if the printing code is in the "start" or possibly "init" method (which may get executed repeatedly). What you could do is to set a boolean field if the printing has been started once, and then not run the printing code again if the boolean is set.
 
Abhijeet Bhatambrekar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is another problem. Initially i was calling this applet on window.open event. Now instead of that, it has to be called when base page gets load. respective changes were made, but printing is not getting started. even i am not getting any exceptions. Anybody will help me, please?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what should happen when. How can the applet -which you said earlier was in a window opened from the base window- do anything if the window hasn't been opened yet? If it should do something once the base window is shown, can't you simply embed it in that page?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic