|
-
May 11th, 2000, 09:27 AM
#1
How to close a Frame via MouseClick?
Hi there!
I made a little Program which uses a Frame with Labels in it to show some Text.
The Problem i have is how to close this Frame just by clicking on it with my Mouse.
I allready implements MouseListener and implments all the methods it needs, but it wont close if i click in it.
Thanks for your help...
Trollpower
-
May 11th, 2000, 09:38 AM
#2
Re: How to close a Frame via MouseClick?
Do you mean that you want to close the frame whereever you click on it?
Kannan
-
May 11th, 2000, 09:41 AM
#3
Re: How to close a Frame via MouseClick?
yes. But for the beginning it is ok if i have to click on a single spot in the Frame (Title, Screen).
Greetings
Trollpower
-
May 11th, 2000, 09:43 AM
#4
Re: How to close a Frame via MouseClick?
i thought that i can add such a Listener simply by "putting" it around the Object itself. For example:
mouseListener(){
Frame myFrame = new Frame();}
something in this way, you know?
Trollpower
-
May 11th, 2000, 11:06 AM
#5
Re: How to close a Frame via MouseClick?
frame.hide();
frame.dispose();
System.exit( 0 ) // If you like to terminate the application.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|