This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Applets and the fly likes How to find applet execution is completed Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Applets
Reply Bookmark "How to find applet execution is completed" Watch "How to find applet execution is completed" New topic
Author

How to find applet execution is completed

Abhijeet Bhatambrekar
Greenhorn

Joined: Dec 27, 2007
Posts: 4
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
Marshal

Joined: Mar 22, 2005
Posts: 35443
    
    9
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.


Android appsImageJ pluginsJava web charts
Abhijeet Bhatambrekar
Greenhorn

Joined: Dec 27, 2007
Posts: 4
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
Marshal

Joined: Mar 22, 2005
Posts: 35443
    
    9
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?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to find applet execution is completed
 
Similar Threads
Printing in JSP
How to use swings with applet
problem with Certificates in bowser
Java printer classes
how to write something in the status bar