• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Self Reloading applet

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!!
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
RyanV
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Readers,
You can use a for loop that contains the following code:
 
RyanV
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ya, of course. Just set the values in the for loop properly. The JOptionPane.showMessageDialog() has to be in the for loop.
 
RyanV
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic