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

Self Reloading applet

RyanV
Greenhorn

Joined: May 06, 2005
Posts: 4
Hi everyone I am working on an applet that self reloads whenever it is cancelled. I have the "applet" done but I cannont seem to find a command that will allow me to reload the applet. I also want to be able to specify how many times it reloads before the cancell button actually cancells it. I am very new to java and would like some sample code of a solution if at all possible. If you help I will give you credit on the final project. Thanks!!!
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Hi,

Welcome to JavaRanch!

This sounds really obnoxious. Why do you want angry users? This wouldn't involve advertising, now, would it?

To do this, you'd have to define what you mean by "cancel" (Close a window? Close a HTML page? Press a "Cancel" button?) and also what you mean by "reload" (Disappear and reappear? Refuse to disappear? Simply do nothing? Truly reinitialize?) Once we know what you want to do, we'll be better able to help.


[Jess in Action][AskingGoodQuestions]
RyanV
Greenhorn

Joined: May 06, 2005
Posts: 4
This is like one of those "are you sure you want to quit" things. I dont want to write a whole new applet for "are you really sure you want to quit?" I would rather just display "are you sure you want to quit?" many times so that even if he closes the html/appletviewer how manynumber of times, he still has recourse. There are people out there that need 2 or more "are you sure you want to quit messages", so I want to modify the number according to the blind impulsivness of the person. That is the point of my applet. To display a vital message more then once so that people wont just click it away.

I would liketo know how to do it on all 3 in case I need a confirmation for something. I would like it to close and then reopen itself. I want it to truely reinitialise.
[ May 06, 2005: Message edited by: Ryan Vergara ]
Shyam Prasad Murarka
Ranch Hand

Joined: May 02, 2005
Posts: 209
Dear Readers,
You can use a for loop that contains the following code:


With Best Regards,
Shyam Prasad Murarka
RyanV
Greenhorn

Joined: May 06, 2005
Posts: 4
Originally posted by Shyam Murarka:
Dear Readers,
You can use a for loop that contains the following code:



can I make it repeat the confirmation dialog more then once? Thanks btw
Shyam Prasad Murarka
Ranch Hand

Joined: May 02, 2005
Posts: 209
Ya, of course. Just set the values in the for loop properly. The JOptionPane.showMessageDialog() has to be in the for loop.
RyanV
Greenhorn

Joined: May 06, 2005
Posts: 4
Do I have to import anything for JOptionpane to work? Also will the return statement just be {
return confirmation diolauge
}

and if not, what will the reutrn statement lool like?
[ May 11, 2005: Message edited by: Ryan Vergara ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Self Reloading applet