Question on JFrame, help me plzzzzzzz!!!

Hi my friend:
I need your help on JFrame urgently. As we know, we close a JFrame by clicking the close button on the window title pane. Now I want to change this default for my JFrame. So that when someone click the close button, an Joptionpane is pop out to confirm the closing action. The JFrame will only be closed by clicking the "OK" button on the Joptionpane. If click cancel, optionpane disappear. How to do this? Pls guide me.

close a JFrame by clicking the close button on the
window title pane. Now I want to change this default
for my JFrame. 1) http://java.sun.com/j2se/1.3/docs/api/javax/swing/JFrame.html#setDefaultCloseOperation(int)
So that when someone click the close
button, an Joptionpane is pop out to confirm the
closing action. The JFrame will only be closed by
clicking the "OK" button on the Joptionpane. If click
cancel, optionpane disappear.2)
if(JOptionPane.showConfirmDialog(JFrame.this,"Really close?","Confirm Window Closing", JOptionPane.YES_NO_CANCEL_OPTION)==?){
//do something...
}the ? means you can figure it out yourself with the documentation...
http://java.sun.com/j2se/1.3/docs/api/javax/swing/JOptionPane.html

Similar Messages

  • My mac's keyboard is not working with my mac.the green light blinks and i cannot get onto my mac. everything on the support questions does not help because i cant go on the mac and i cant sign in

    my mac's keyboard is not working with my mac.the green light blinks and i cannot get onto my mac. everything on the support questions does not help because i cant go on the mac and i cant sign in

    If you can't sign in, then you can't troubleshoot and/or pair the keyboard until after that........ so, for that, you will need to borrow someone's USB wired keyboard in order to get signed in and to the Keyboard Bluetooth Preferences.

  • I don't remember my security questions and I tried guessing them and now I can't buy anything for 8 hours please fix this so I can download stuff and I don't remember any of my security questions. Please help me out as soon as possible

    I don't remember my security questions and I tried guessing them and now I can't buy anything for 8 hours please fix this so I can download stuff and I don't remember any of my security questions. Please help me out as soon as possible

    Username188 wrote:
    I don't remember my security questions and I tried guessing them and now I can't buy anything for 8 hours please fix this so I can download stuff and I don't remember any of my security questions. Please help me out as soon as possible
    Go to https://getsupport.apple.com ; click 'See all products and services', then 'More Products and Services, then 'Apple ID', then 'Other Apple ID Topics' then 'Forgotten Apple ID security questions'.

  • "hi i forgot my security questions ansewers plesas help how recover man answers "

    "hi
    i forgot my security questions ansewers
    plesas help how recover man answers

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (99272)

  • Im in libya and i forgot my security question answers pleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeease help fast

    im in libya and i forgot my security question answers pleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeease help fast

    How to reset your Apple ID security questions.
    Go to appleid.apple.com, click on the blue button that says 'Manage Your Apple ID'.
    Log in with your Apple ID and password. (If you have forgotten your Apple ID password, go to iforgot.apple.com first to reset your password with a password recovery email)
    Go to the Password & Security section on the left side, and click on the link underneath the security questions that says 'Forgot your answers? Send reset security info email to [email]'.  This will generate an automated e-mail that will allow you to reset your security questions.
    If that doesn't work, or  there is no rescue email link available, then click on 'Temporary Support PIN' that is in the bottom left side, and generate a 4-digit PIN for the Apple Account Security Advisor you will be contacting later.
    Next, go to https://getsupport.apple.com
    (If you see a message that says 'There are no products registered to this Apple ID, simply click on 'See all products and services')
    Choose 'More Products & Services', then 'Apple ID'.
    A new page will open.
    Choose 'Other Apple ID Topics', then 'Forgotten Apple ID Security Questions'.
    Click the blue 'Continue' button.
    Select the contact option that suits your needs best.

  • Sorry the answer to my previous question did not help....when trying to get app message tells me I do not have acc or its been disabled. Is this because of joint usage of email as my partner has account with iTunes using same email?

    Sorry the answer to my previous question did not help....when trying to get new app installed on iPad  message tells me I do not have acc or its been disabled. Is this because of joint usage of email as my partner has account with iTunes using same email?

    Whatever the reasons are that you think the problem exists, you will not be able to resolve it on your own. Did you see this at the bottom of the support article that I suggested that you read?
    Additional Information
    If the issue persists, you can visit iCloud Support, iTunes Support, Apple Print Products, or contact AppleCare for further assistance.
    You should probably contact iTunes Support.

  • HT5622 i cant find where its says reset you security question? please help thanks

    i cant find where its says reset you security question? please help thanks

    The Three Best Alternatives for Security Questions and Rescue Mail
         1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
         2.  Call Apple Support in your country: Customer Service: Contact Apple support.
         3.  Rescue email address and how to reset Apple ID security questions.
    A substitute for using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • I want reset my sec questions. I can't change sec question. Please help me

    I want reset my sec questions. I can't change sec question. Please help me

    Click here for information. If the option to have the answers emailed to you isn't available or doesn't work(the email may take a few hours to arrive), contact the iTunes Store staff via the link in the 'Additional Information' section of that article.
    (90265)

  • HT5312 sorry! i can't reset Apple ID security question. Please help me

    sorry! i can't reset Apple ID security question. Please help me

    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • Hello I am forget my security question. Please help me.

    Hello I am forget my security question. Please help me.

    Read this about how to change the security questions: http://support.apple.com/kb/HT5312
    If you can't use these procedures you will have to contact Apple. See http://support.apple.com/kb/HT5699

  • I submitted a question on the help site and it hasn't shown up in my Dashboard

    I was signed in , asked a question on the help site a couple days ago and the question still hasn't shown up in my Dashboard. Please tell me how to get it there and more importantly, how to avoid this in the future.

    Try:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    Are you saying that it is not listed here:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Is the computer signed into the same iTunes account that purchased the song?
    Is it listd in your Purchases History? iTunes>Store>View Accountc>login>Purchase History?

  • Question on search help

    hello,
    I have create a search help in KRED. I have a field LIFN2 which is the "reference to other vendor field" in my help. when I go to the MIRO transaction and goto the details tab and click in the field "inv.party", the search appears. the problem that I am having is that when I double clik on one the records in the search list, it is supposed to fill in the vendor number with the LIFN2 value but it is not. I have this selected for import and export in the search help. I am not sure if there is something else that I have to do. If some one could please help me , that would be apporeciated
    thanks in advance for the help

    thanks for the respopnses
    I have the EXP checked for this field. when I active the search help, I get warnings and when you click on this warning
    <b>No values can be returned from contained search help ZVENDORS_PARTN </b>
    I get the following
    <i>Diagnosis
    The collective search help in question contains search help ZVENDORS_PARTN. When parameters were assigned to these two search helps, however, no EXPORT parameter of ZVENDORS_PARTN was assigned to an EXPORT parameter of the collective search help. In an input help process in which the user selects elementary search help ZVENDORS_PARTN (or an elementary search help contained in collective search help ZVENDORS_PARTN), no value is returned to the screen.
    System response
    The action is continued.
    Procedure
    If ZVENDORS_PARTN is directly included in the collective search help in question, check the parameter assignment for this inclusion. It is possible that some meaningful parameter assignments were not defined. It is also possible that the EXPORT flag is missing for one or more parameters of one of the two specified search helps.
    If ZVENDORS_PARTN is contained in several levels of the collective search help in question, you should check the parameter assignments and parameter attributes of all the levels in between.</i>
    I get this message in the following sections
    SHLP KRED_AG was adjusted    
    SHLP KRED_C was adjusted    
    SHLP KRED_T was adjusted    
    SHLP MEBO_KRED was adjusted
    I am not sure what to look at now to try to correct this

  • Every time I load Firefox it loads a tab called "ask a question|Navigation|Firefox Help" -- how do I disable this?

    Running Windows XP, Firefox 3.6.16

    Thanks for the swift reply. I'm sorry I wasn't clear in my question. Two tabs are loaded. One tab is my Home Page the other is the tab called "Ask a question|Navigation|Firefox Help" It's not a problem, just an irritation because I delete the tab every time. I have the "Help" menu selection and can click at any time so I don't need that "Ask a question|Navigation|Firefox Help" tab loading each time.

  • HT201303 I forget answer security questions. How to changer answer your security questions?.Please help me!

    I forget answer security questions.
    How to changer answer your security questions.
    Please help me!. Thankyou very much!

    Try going to https://appleid.apple.com/, click 'Manage your account' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and see if you can change your questions/answers, and then click Save at the bottom right.

  • HT5312 hello.I forget my security questions answer.please help me.please.please

    Hello.
    I forget my security questions answer.please help me.please.please

    See Here..
    Apple ID: Contacting Apple for help with Apple ID account security

Maybe you are looking for

  • Payext Idocs Issue

    Hi, I am generating payext idocs off the back of a payment run (F110). The issue that I have is where I am paying a supplier with multiple invoices, that the individual invoices are all included in the IDOC. When the bank statement is returned to us,

  • Why do the new maps in ios6 show many wrong English translastions about Hong Kong Streets and buildings?

    Why do the new maps in ios6 show many wrong English translastions about Hong Kong streets and buildings?

  • RV320, load balancing problem

    Hi, How do I force the router to use WAN1 till it's saturated, and ther switch to WAN2 when needed. I've already configured the bandwidth correctly for each WAN, but it seems that some clients use WAN1, others use WAN2, disregarding the fact that the

  • I have PS Elements 11 and Lr 4.4, no option to transfer catalog

    The manual / instructions show an option to transfer a PSE catalog along with tags etc, to Lightroom, under the File dropdown. There is no option in my newly set up LR 4.4. Any ideas?

  • Activate PF-Status as well as At LINE-SELECTION

    Hi, i have a problem, i have created a graph icon on the main list using SET PF-STATUS and the icon is cumin and the graphis also beiing displayed. at a later stage in reporting, i used AT LINE-SELECTION. but this is not gettin executed when i double