Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to Close an application

 
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
 
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?
 
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
 
Danger, 10,000 volts, very electic .... tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic