• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Close an application

 
anand chawla
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
I m making a software for a Cybercafe.
I m opening the internet explorer through a button on frame..created in java.
After 1 hour I want the explorer to close automatically.
is it possible.I think it is please help me.
the second problem is that if i have multiple explorers open,If i want all of them to close automatically after 1 hour...is it possible...please help me.
Thanks
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe the Applet forum would be a better place to get an answer to this question. I'll transfer this thread there.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you can do this from an applet. I know you can close browser windows from JavaScript, but if you try to use a window.close() on a window that you didn't open with window.open() you will get a dialog telling you that the application is trying to close the window, and is that OK? You could write a JavaScript that handles the closing of the window and call it from your applet. Would that help you?
 
Charlie Boss
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i'm also interested in this answer. Heres my scenario. A user clicks on a link to my applet and it opens another window which holds my applet. My applet is also in a frame.
I currently call window.close() from my applet. However whenever the user goes back to click on the applet link (the previous window) the applet never reloads..
I partially solved this by calling System.exit(0/1) before i called the window.close().. my applet exited AND i had no problem clicking on the applet link to reload it.. HOWEVER the applet browser will still be open.. (my applet is in its own frame)..
when call System.exit(0/1) after i call the window.close() then both windows close.. the browser window holding my applet AND the browser window containing my applet link.
i want to be able to call window.close() so it closes my applet browser window and also call system.exit() so i can reload my applet.
 
anand chawla
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well Guys You are mistaken,
What i Meant is that I created a Application in java.
which has frame and the button exists on frame.
its not a applet
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic