File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes How to find applet execution is completed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
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: 41106
    
  45
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.


Ping & DNS - my free Android networking tools app
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: 41106
    
  45
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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to find applet execution is completed
 
Similar Threads
how to write something in the status bar
Printing in JSP
problem with Certificates in bowser
Java printer classes
How to use swings with applet