Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

disconnection on exit

Thread view: 
Brandon McCombs - 06 Feb 2006 04:50 GMT
hello,

My application connects to an LDAP server and upon exiting my app I want
to disconnect from the directory server.  I have a File->Exit menu
option but what happens if a user clicks on the X in the corner of the
window? Where do I place my disconnection method to handle that? Do I
have to change what the default close operation is for the JFrame?

thanks
JScoobyCed - 06 Feb 2006 05:27 GMT
> hello,
>
[quoted text clipped - 5 lines]
>
> thanks

You can use the WindowListener and the
void windowClosed(WindowEvent e)
method.

Signature

JSC

Brandon McCombs - 06 Feb 2006 05:56 GMT
>> hello,
>>
[quoted text clipped - 10 lines]
> void windowClosed(WindowEvent e)
> method.

ah that's it. I completely forgot about that. Thanks.
Brandon McCombs - 06 Feb 2006 06:10 GMT
>> hello,
>>
[quoted text clipped - 10 lines]
> void windowClosed(WindowEvent e)
> method.

I had to use windowClosing() method but I think it's doing what I want
since I saw output from my System.out.println() methods when I did not
see output when I used windowClosed().


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.