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 Applet dont show the Components when jsp page is Minimized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet dont show the Components when jsp page is Minimized" Watch "Applet dont show the Components when jsp page is Minimized" New topic
Author

Applet dont show the Components when jsp page is Minimized

prem kanna
Greenhorn

Joined: Sep 10, 2008
Posts: 26
Hi,

I’ve embedded applet in a jsp page. Initially appearance of applet is coming well. After some time during the process of applet , when the browser window is minimized and restored or if we are switching to any other window and coming back to the applet embedded jsp page, the things whatever displayed in applet are vanished because of which behavior of applet could not be recognized.

I’ll explain the applet process flow briefly. My applet is for transferring files from local machine to server through FTP concept. To show the progress of file transfer I’ve used progress bar with percentage displayed on it. As the files are transferred, progress bar status varies and also the percentage displayed.

Because of the above mentioned problem, the end user could not see the progress bar or anything else displayed in the applet. Problem is with applet behavior only.

Can any body suggest me how to rectify this problem?

Following is the fraction of applet code I’ve used.


Following code explains how the applet is embedded in JSP.





is there any possible then modify this code and add paint() or repaint() or update() methods. can any one please give me the solution.

[ UD: added linebreaks to preserve layout ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
This may not have anything to do with the problem, but your code should not be calling the applet's init and start methods. The browser does that for you, and if you call those a second time, things may go wrong. Google for "applet lifecycle" for an explanation of when the various applet methods are called automatically.


Ping & DNS - my free Android networking tools app
prem kanna
Greenhorn

Joined: Sep 10, 2008
Posts: 26
hi,

once again i will explain my applet flow. when the user enters into a given jsp page then the applet must be loaded but not performing any action and when ever user clicks the jsp button then the applet must be loaded(now only the required informations are passed to the applet from jsp page) and it wants to Perform the particular action(like copying file), on that time it shows the components. but if i minimize this jsp page then the components are not showing. please resolve this problem. thanks in advance.






Ulf Dittmer wrote:This may not have anything to do with the problem, but your code should not be calling the applet's init and start methods. The browser does that for you, and if you call those a second time, things may go wrong. Google for "applet lifecycle" for an explanation of when the various applet methods are called automatically.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
It doesn't matter what your applet is doing - you need to be aware of the applet lifecycle, and work with it, not against it; otherwise there will be problems.
prem kanna
Greenhorn

Joined: Sep 10, 2008
Posts: 26
ok. thank you.



Ulf Dittmer wrote:It doesn't matter what your applet is doing - you need to be aware of the applet lifecycle, and work with it, not against it; otherwise there will be problems.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet dont show the Components when jsp page is Minimized
 
Similar Threads
Making Typing "Game", any tips or pointers before I start?
Dual Program (Applet & Application) : Need to know how to improve in Applet ways only!
Progress Bar and Thread
problem while displaying multipage tiff image in applet
iterate problem in struts2