How to get the Application perform actions when exits?

How to get the Application perform actions when user clicks on the "X" icon in the top right hand corner?
OR
If i placed an Exit Button.... when actions that i need to use to allow my application to perform a certain action when it exits?
Thanks

frame.addWindowListener(new WindowAdapter() {
  public void windowClosing(WindowEvent e) {
    // do your stuff here
});The WindowListener and WindowEvent can be found in java.awt.event package
//David

Similar Messages

  • How to get the full image directory when i upload the image to web page???

    hai, how to get the full image directory when i upload the image to web page???
    here is the example:
    <form action="uploadfile.jsp" method="post">
    image<input type="file" name="image" />
    <input type="submit" value="submit"/>
    <%
    String s=request.getParameter("image");
    %>
    <%=s%>
    </form>
    i upload the image from C:\image\center.gif. i use request.getParameter just can get the image name like "center.gif". Can anybody help me how to get the full path name. Thanks a lot..

    There is no need to get the path. It is also fairly pointless as the server cannot access the client's local file system.
    Carefully read this article how you can upload files the right way: http://balusc.blogspot.com/2007/11/multipartfilter.html

  • How to get the health , performance information and about the services run on devices that have connected to the system center?

    Hi All,
    I want to know how to get the health , performance information and about the services run on devices that have connected to the system center to my c# application. Also I need to know about the information of databases that have connected to system center.
    I will appreciate your feedback
    Thank you

    Hi,
    You can configure service monitor for the required service on the server
    refer below link for how to configure service monitoring
    http://www.bictt.com/blogs/bictt.php/2011/03/17/scom-monitoring-a-service-part3
    You can use SCOM SDK to connect to the scom server using c# and get required information
    http://msdn.microsoft.com/en-us/library/hh329086.aspx
    you can find the database in below registry path on management server
    HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup\DatabaseName
    Regards
    sridhar v

  • How to get the application path?

    Does some body know how to get the application path in Java? Here is an example about what I'm thinking: Let's imagin the application is on "c:\try" or "c:\ProgramFiles\MyApp". My question is how can I find the path where the application is. Please give an example if you know the answer. Thank you so much.

    Those two replies give you some useful directories, it's true, but maybe not what the OP asked. However the OP asked for something that doesn't have a meaning (applications don't have to be "on" any directory, whatever that might mean).
    Would the OP like to describe what the actual problem is here?

  • HT4623 i have iOS 4.2.1 in 3G old one. how to get the applications for this iOS

    i have iOS 4.2.1 in 3G old one. how to get the applications for this iOS

    look at this thread
    https://discussions.apple.com/message/22837309#22837309

  • How to get the table Event action in the controller???

    HI
    Based on my requirement i have extended my controller,but i want to perform some validation like ,,,,
    i have table in one region ,in which one column is having a Button (flex field) action with image,
    i want to write the code in the controller according to the validation ,,,,but i am unable to find the event action in the main controller,
    how to get the event action ?,,,,, of the item type as image
    thanks in advance
    Kash

    If not you can use image component with clientListener and serverListener to preform your requirement set clientListener click event and then inside clientListener java script method call the
    serverListener then will execute serverListener method.

  • How to get the PDF Document version when using Digital Signature

    Hi,
    I have a form which contains two signature fields.
    When i sign the form the pdf document is saved as a version which can be seen by clicking the Signature Panel.
    I need to get the binary of the versions stored in the form.
    Please suggest me the how to get the version data from the form.
    Regards,
    S.V.atish Kumar

    Hi Mithun:
    I think I have run into a similar issue and have not been able to find a resolution.
    I have been trying to place three groupings of data and limit them to 15 rows; additional rows would print on a void check on a next page using the rtf template.
    Earnings .............. Pre-Tax Deductions .........Taxes
    <line 1 earnings> <line 1 pre-tax deductions> <line 1 tax dedcutions>
    <line 2 earnings> <line 2 pre-tax deductions> <line 2 tax dedcutions>
    <line 3 earnings> <line 3 pre-tax deductions>
    <line 4 earnings> <line 4 pre-tax deductions>
    <line 5 earnings>
    <line 6 earnings>
    The template works fine with these lists as nested tables until I add in the restriction and filler for the 15 rows for the first table. The data in the 2nd two lists does not appear once the limitation is added.
    Check Writer (XML)  - Issues with payroll check stub in rtf
    As an alternative, I have been thinking adding the remaining line totals (over 15 rows) and adding a 16th row. However I have been running into an error when trying to use the code for-each-group.
    *** XML-22056: exactly one of four group attributes must be present in xsl:for-each-group
    Can you send me your template to review? My email is: Karen.Lacey(AT)paetec(DOT)com
    Thanks!
    Edited by: RedLacey on Dec 17, 2009 11:48 AM

  • How to get the URL parameter value when navigating from JSP Page to portal

    Hi All,
    I have web Dynpro application with one button, while clicking that button It will navigate to JSP page as external window. In the JSP page I have a input field and Button.
    In the JSP page input field I will enter some values and press submit button, it will navigate to Portal page by passing some URL parameter with values.
    Once user entering to portal by default WD page displayed, the same WD page I try to get the URL Parameter which I have passed from JSP page, but I am not able to get the URL parameter value.
    If same application running in without portal, I can able to get the URL parameter values. I am getting the URL parameter by interface view default inbound plug parameter.
    How do we resolve this problem?
    Regards,
    Boopathi M

    Hi
    Please try  these link might helpful for you
    1.[How to call WebDynPro application from JSP |/thread/452762 [original link is broken];
    2.[How to get the previous page url from abstract portal component? |/thread/1289256 [original link is broken];
    3.[how to launch and pass a parameter |/thread/5537 [original link is broken];
    Best Regards
    Satish Kumar

  • How to get the Application name/fullpath in a servlet deployed in WebLogic

    Hi ,
    Just like we can get the domain root directory from weblogic.management.DomainDir
    String root = DomainDir.getRootDir() ;and domain name from weblogic.management.configuration.DomainMBean
    DomainMBean domainMBean = MBeanUtils.getDomainMBean();
    String domainName = domainMBean.getName() ;How can i get , the application name in which the servlet is deployed from inside the same servlet ? Which API from weblogic provides that information ?
    for eg : application path = Middleware/user_projects/domains/Domain_1/servers/AdminServer/upload/webapp1.war
    and application name = webapp1.war
    Edited by: Tom on Mar 31, 2011 9:32 PM

    Not sure about Weblogic Specific API however you can use Java API.
    public void init(ServletConfig config) throws ServletException {
              // TODO Auto-generated method stub
              System.out.println(config.getServletContext().getRealPath(""));
              System.out.println(config.getServletContext().getContextPath());
    output:
    C:\Documents and Settings\user\KEDB\KEDBRISKIT\WebContent --- Application Path
    /KEDBRISKIT --- Application Name
    -Akshay

  • How to get the application expose with a mouse

    Hi,
    I want to get a quick overview of all open windows of the SAME application (= application expose). Normally, you can do this with your trackpad (three or four fingers down movement); I am now working with a "normal" (non-Apple) mouse and keyboard. How do I get the application expose with the mouse? I am able to quickly get the misson control wiht CTRL + right mouse click; and I am getting the App expose with shift + arrow down.
    Isn't there a way to get the application expose with the mouse as well? E.g. CTRL + Shift + right click would be very useful but that's taken by the 'slow moving' mission control.
    I know, it's a minor detail but it would be quite good for the workflow
    Any hint is most welcome. Many thanks.

    grab all the code inside the actionPerformed(ActionEvent e) method

  • How to get the array of Complex when call a webserivce method it's return an array of user define data struct?

    When call a webservice opreation, it returns an array of complex type, sure, the calling is successed,  but i don't know how to get the return values,
    I have tried use Pendingcall.response & Pendingcall.getOutPutValues() in Pendingcall.onResult event function...
    Waiting....

    Flash Lite doesn't fully support webservices, so you will find it difficult to use the full api set.
    I suggest that you use SWX (swxformat.org) or simply HTTP requests for transactions.
    We have a tutorial on use with ColdFusion here:
    http://vimeo.com/6829083
    Mark

  • Why do I get "The exception Privileged instruction (0xc0000096) occured in the application" error message when exiting LabVIEW 6.1?

    I have created a vi that uses the LV-GPIB and database connectivity vis. The program runs fine and it ends execution by running the "Close Database Connection.vi".
    After closing out my front panel windows and exiting LabVIEW 6.1, I get an error dialog box that reads the message "The exception Privileged instruction (0xc0000096) occured in the application". What does this error mean and how do I resolve it?
    Thanks,
    Taf

    Hi Taf,
    Given the broad scope of your application, it may be best to try and isolate the problem down by taking out parts of your application and simplifying it down as much as possible until you can get a consistent version that throws this exception. I would first try to take out either the GPIB or database connectivity portions of the application to narrow down our problem. This error generally occurs when accessing DLLs and external applications, so I wouldn't be surprised if it's the GPIB or database. Let's try to see exactly which one it is and then we can dig deeper into that part of the code. Thanks for your cooperation!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • How to get the total page number when using Crystal Report in JSP

    In my JSP, I use the class CrystalReportViewer to generate and display the report views. But this class only sypply the function to get the info of the active view.
    Thus with this info, I only can get the active view's page number. How can I get the report total page number without showing the last page first?
    Thanks.

    Anything you do without submitting to form has to be done on the client side (ususally by JavaScript) using data which has been send already from the server.
    With JavaScript you can do quite a bit. You can download tables which don't necessarilly appear on the screen, loading them into JavaScript arrays by dynamically generating javascript. Then you can pick up events like drop-box selection and use these tables to chose what you do next (e.g. preloading other fields, setting drop box content etc.).
    Or, you can cause forms to be submitted when actions like a selection happen without the user clicking a button. It's generally a matter of how much data you'd need to transmit.
    Another posibility is to use a Java applet, which can generate requests to the server and handle the results as it chooses. That are a number of problems with that but occasionally it's the best solution.
    What you can't do is to handle user input inside a JSP. The JSP has come and gone before the user even gets to see your form.

  • How to get around a performance issue when dealing with a lot of data

    Hello All,
    This is an academic question really, I'm not sure what I'm going to do with my issue, but I have some options.  I was wondering if anyone would like to throw in their two cents on what they would do.
    I have a report, the users want to see all agreements and all conditions related to the updating of rebates and the affected invoices. From a technical perspective ENT6038-KONV-KONP-KONA-KNA1.  THese are the tables I have to hit.  The problem is that when they retroactively update rebate conditions they can hit thousands of invoices, which blossoms out to thousands of conditions...you see the problem. I simply have too much data to grab, it times out.
    I've tried everything around the code.  If you have a better way to get price conditions and agreement numbers off of thousands of invoices, please let me know what that is.
    I have a couple of options.
    1) Use shared memory to preload the data for the report.  This would work, but I'm not going to know what data is needed to be loaded until report run time. They put in a date. I simply can't preload everything. I don't like this option much. 
    2) Write a function module to do this work. When the user clicks on the button to get this particular data, it will launch the FM in background and e-mail them the results. As you know, the background job won't time out. So far this is my favored option.
    Any other ideas?
    Oh...nope, BI is not an option, we don't have it. I know, I'm not happy about it. We do have a data warehouse, but the prospect of working with that group makes me whince.

    My two cents - firstly totally agree with Derick that its probably a good idea to go back to the business and justify their requirement in regards to reporting and "whether any user can meaningfully process all those results in an aggregate". But having dealt with customers across industries over a long period of time, it would probably be bit fanciful to expect them to change their requirements too much as in my experience neither do they understand (too much) technology nor they want to hear about technical limitations for a system etc. They want what they want if possible yesterday!
    So, about dealing with performance issues within ABAP, I'm sure you must be already using efficient programming techniques like using Hash internal tables with Unique Keys, accessing rows of the table using Field-Symbols and all that but what I was going to suggest to you is probably look at using [Extracts|http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9ed135c111d1829f0000e829fbfe/content.htm]. I've had to deal with this couple of times in the past when dealing with massive amount of data and I found it to be very efficient in regards to performance. A good point to remember when using Extracts that, I quote from SAP Help, "The size of an extract dataset is, in principle, unlimited. Extracts larger than 500KB are stored in operating system files. The practical size of an extract is up to 2GB, as long as there is enough space in the filesystem."
    Hope this helps,
    Cheers,
    Sougata.

  • How to get the main funciton name when calling another function inside?

    for eg, one RFC named A,inside A,a funtion B is called.when the processing is at B now,how can i get the main RFC name(A)?
    any help will be much appricated.

    > just see SM50,there is a column called 'Report',it shows the program id the proess is now processing.but i don't know its main program or say it 'the process's first excuting program',how can i get it programmatically?
    I'm still not sure to understand. The program in SM50 is the current main program (not the first). It is stored in SY-REPID system variable. Or use this code:
    DATA lt_callstack_long TYPE abap_callstack.
    DATA ls_callstack_long TYPE LINE OF abap_callstack.
    CALL FUNCTION 'SYSTEM_CALLSTACK'
          IMPORTING
            callstack    = lt_callstack_long.
    READ TABLE lt_callstack_long INDEX 1 INTO ls_callstack_long.
    WRITE : / 'current main program is:', ls_callstack_long-mainprogram.
    If you want to know the frame program (the first called), use SY-CPROG, or use this code:
    DATA lt_callstack_long TYPE abap_callstack.
    DATA ls_callstack_long TYPE LINE OF abap_callstack.
    CALL FUNCTION 'SYSTEM_CALLSTACK'
          IMPORTING
            callstack    = lt_callstack_long.
    " read last line = first called program
    DESCRIBE TABLE lt_callstack_long. "to make sy-tfill = number of lines
    READ TABLE lt_callstack_long INDEX sy-tfill INTO ls_callstack_long.
    WRITE : / 'First main program is:', ls_callstack_long-mainprogram.

Maybe you are looking for

  • Adobe Photoshop CS5 Crash Upon Start up -

    Greetings, I am having a problem upon the launch of Photoshop CS5. I keep getting the following message: "An unexpected and unrecoverable problem has occurred. Photoshop will now exit" Then I get a little window that is titled:  Microsoft Visual C++

  • Maintaining Issue for BBPC_UP_DOWNLOAD Contract Download/Upload in SRM 7.0

    Hello Experts, I'm trying to create a new variant in BBPC_UP_DOWNLOAD table for achieving customer demands while downloading contract in SRM 7.0. I have referred many OSS notes (1612239, 812884 etc.) for this but I couldn't succeeded to maintain tabl

  • IPhoto Transfer from Computer to Computer

    my boss wants me to put the entire iPhoto library I have been organizing onto his computer. Do I copy and paste? Use iPhoto Library Manager(the paid version)? or Migration Assist? He wants all albums and keywords and faces and etc. to stay in tact as

  • Get Info for multiple files

    OS X 10.9.4, 27", late 2013 Seems to be a beginner's problem, sorry - I have a folder on my HD with 250 mp3 files (1.25GB) and want to copy some to a SD card (512MB). So I (shift) select say 95 files in Finder: It lists "95 of 250 selected, 723.39 GB

  • Tables in Dreamweaver format issues..

    I sliced table and brought it into DW. It looks fine on it's page, but I copy the table code into another nested table it shifts everything. I even took out rowspan and gave the cells exact with/height and it still doesn't close gaps... What can I do