aspose file tools*
The moose likes Applets and the fly likes Applet not getting refreshed after restart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet not getting refreshed after restart" Watch "Applet not getting refreshed after restart" New topic
Author

Applet not getting refreshed after restart

Sourav Acharya
Greenhorn

Joined: Aug 23, 2012
Posts: 6
I have java application in which applets are used. This application is meant to work on IE6 and JRE1.4 but now with upgrades available applets used in application is giving problem.
ISSUE: i click on a button in my application to view an image, then the applet opens and i see the image. I close the applet and click on button to view another image but previous image comes up in the applet. The JRE loading image which comes up on applet start doesn't come the second time. If i wait for a min or two i can see JRE icon disappear from the taskbar tray and then if i view my second image it shows the correct one. Can anyone tell me how can i make applet reload itself after i close the applet window???
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

Sourav Acharya wrote:I close the applet

How do you close an Applet?


luck, db
There are no new questions, but there may be new answers.
Sourav Acharya
Greenhorn

Joined: Aug 23, 2012
Posts: 6
by clicking on the close button at the top
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

I've never seen a close button on an Applet. Can you post a screenshot, and relevant code -- in the form of an SSCCE <- link
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Sourav Acharya wrote:The JRE loading image which comes up on applet start doesn't come the second time.


The loading screen is displayed when the applet is being loaded for the first time.

Sourav Acharya wrote:Can anyone tell me how can i make applet reload itself after i close the applet window???

Tale a look at the applet's life cycle methods: init(), start(), destroy()


PM Me If You Want to get Urgent Help on Java Programming
Sourav Acharya
Greenhorn

Joined: Aug 23, 2012
Posts: 6
code works fine in jre1.4 but goes for toss in jre1.6... do i need to make any changes in methods: init(), start(), destroy() for jre1.6???


[Thumbnail for doc.JPG]

Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4658
    
    5

That's not a close button of an Applet. The close button is of the Internet Explorer window.
Sourav Acharya
Greenhorn

Joined: Aug 23, 2012
Posts: 6
ok thanks but any solution to my problem
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Sourav Acharya wrote:ok thanks but any solution to my problem

Hmm. What do you mean by 'make applet reload itself'? Cannot help further without additional details like relevant code.
Sourav Acharya
Greenhorn

Joined: Aug 23, 2012
Posts: 6
by reload itself i mean i want evrytime i close the browser the the applet should stop, destroy anythng it is caching and close, when i view the doc next time a java applet should start again.
Sourav Acharya
Greenhorn

Joined: Aug 23, 2012
Posts: 6
<applet code="appviewer.ViewerApplet.class" archive="Library/cmbview81.jar,Library/TViewerDefaultIcons.jar,Library/appclasses.jar" width="100%" height="100%" name="ViewApplet">
<c:forEach items="${model.listFile}" var="fileList" varStatus="loop">
<param name="imageName<cut value="${fileList.fileNumber}"/>"
<c:choose>
<c:when test="${fileList.isRescan == 'true'}">
value="SearchAndView/rescan/<%=session.getId()%>/<cut value="${fileList.fileName}"/>"
</c:when>
<ctherwise>
value="SearchAndView/<%=session.getId()%>/<cut value="${fileList.fileName}"/>"
</ctherwise>
</c:choose>
>
<param name="cache_option" value="Plugin">
<param name="cache_archive" value="Library/cmbview81.jar">
<param name="fileName<cut value="${fileList.fileNumber}"/>" value="<cut value="${fileList.fileValue}"/>">
</c:forEach>
<param name="imageCnt" value="100">
</applet>

this is the code i am using . should i make any changes here if am using IE8 and JRE1.6 as this code works fine in IE6 and JRE 1.4

 
jQuery in Action, 2nd edition
 
subject: Applet not getting refreshed after restart