[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

File menu and Exit: Invoking closing the window

Posted on 2003-11-25
10
Medium Priority
?
288 Views
Last Modified: 2010-03-31
I am working on java applet and trying to implement the following.

The top-level window has a File menu containing a menu item "Exit". When "Exit" is invoked the application will close the window (the user sees an empty applet page with just the title and header)

I did implement the appearance file menu and exit option, but does nothing.)
How do I implement the above "Exit" behavior?

Thank you for help
0
Comment
Question by:dkim18
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 9817650
If it's a JFrame or Frame, just do

frame.dispose();

Remember, you can't do System.exit in an applet
0
 
LVL 92

Expert Comment

by:objects
ID: 9820562
Use showDocument() to load a new empty page.
0
 

Author Comment

by:dkim18
ID: 9828698
It is not Frame, but JApplet
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 92

Expert Comment

by:objects
ID: 9828721
then use showDocument:

applet.getContext().showDocument(url);
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9828756
What is

>>The top-level window

then?
0
 
LVL 92

Expert Comment

by:objects
ID: 9828769
Or if you don't want to switch page for some reason then remove the content from your applets root pane.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9828818
Have you got an applet inside a frame? What is the relationship between application/applet or frame/applet?
0
 

Author Comment

by:dkim18
ID: 9828970
Please refer below site to all your questions. It is going to be better than my explnation.
There is a sample picture for this applet, so you can get better understanding.

http://webdev.apl.jhu.edu/%7Emed/fall03/homework/04LibrarySwing.html

0
 
LVL 92

Accepted Solution

by:
objects earned 1000 total points
ID: 9829008
with the code i posted in your other question have your exit action do:

f.hide();

0
 
LVL 92

Expert Comment

by:objects
ID: 9879393
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question