Popup a message and if the user doesnt answer - do something!

Hi,
I'm trying to write a simple popup message, but I want that if the user doesnt answer (press OK) for lets say - 10 seconds, I'll make 3 beeps.
the value of the JOptionPane until the user is answering is UNINITIALIZED_VALUE but I cant get that value because the thread is waiting for the
return value from 'setVisible' method.
It means I got to start another thread that will check the value after 10 minutes?
If so, how am I doing it? Im pretty weak when it comes to play with threads. and how do I 'say' to the "stuck" thread to stop waiting for a return value?
thanks,
Michael.
by the way - thats the code Ive written for the popup-
            JOptionPane pane = new JOptionPane("Message body!");
         Object[] options = new String[] { "OK" };
         pane.setOptions(options);
         JDialog dialog = pane.createDialog(new JFrame(), "Headline");
         dialog.setVisible(true);
         Object obj = pane.getValue();
         if (obj == JOptionPane.UNINITIALIZED_VALUE) {
              // Beeping...
         }

Before you show the popup you can start a Swing Timer. If the Timer fires you can do whatever processing your want. If the popup is closed then you stop the timer to make sure it doesn't fire.
Read the section from the Swing tutorial on [How to Use Timers|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html].

Similar Messages

  • Error message - attributes of the user inconsistent or not defined

    Hi,
    We are in SRM 7.0 have created new plant and some users assigned to this plant.
    However when logged into portal page, it gives the error message ' Attributes of the user inconsistent or not defined' see PPOMA_BBP.
    When checked in the org structure the data entered are correct.
    What could be the reason for this error message.
    Rgds,
    Madhan

    Hi,
    Please check the following in the org structure in PPOMA_BBP for the users
    1. Check whether the attribute for the ITS --URL is given.
    2.Check the attribute for the company code is given.
    3.Check whether the Roles for the users is given
    in addition go to the check  tab and check if any Red mark are there.
    correct those attribute.
    The error is basically related to  the PPOMA_BBP only
    Regards
    G.Ganesh Kumar

  • HT4623 I AM FACING PROBLEM AFTER UPDATING (7.0.4) MY PHONE MODEL 5C,AFTER THIS UPDATE SOME TIMES I CANT MAKE CALLS & SOME TIMES WHEN ANY BODY ELSE WANTS TO CALL ME BACK THE MESSAGE COME THAT THE USER IS NOT REACHABLE.PLS HELP

    I AM FACING PROBLEM AFTER UPDATING (7.0.4) MY PHONE MODEL 5C,AFTER THIS UPDATE SOME TIMES I CANT MAKE CALLS & SOME TIMES WHEN ANY BODY ELSE WANTS TO CALL ME BACK THE MESSAGE COME THAT THE USER IS NOT REACHABLE.PLS HELP

    I am facing the same issue! I bought 5c few days back
    and everything was fine till I updated the software 7.0.4!
    Whenever am connected to wifi am unable to make a call and if someone tries
    Calling me they get the message that my number is not
    Reachable! When I go back to 3G the calls work perfectly!!
    Please help me out since I use wifi more than my network.
    Appreciate any advise on this

  • HT4436 why do i keep getting a message that states "the user name or password for "icloud" is incorrect?

    Why do I keep getting a message that states "the user name or password for icloud is incorrect.

    Apple are currently trying to get less secure passwords updated. They require that your account passwords are at least eight characters long and contain both alpha and numeric characters and at least one upper case alpha character.
    You might try changing your account password to match these requirements.
    My Apple ID

  • So I download photoshop cc (2014) and when I go to open the program, it gives me an error message and shuts the program down. It says," A problem cause the program to stop working correctly. Windows will close the program." Can someone help me please?

    So I download photoshop cc (2014) and when I go to open the program, it gives me an error message and shuts the program down. It says," A problem cause the program to stop working correctly. Windows will close the program." Can someone help me please?

    I've got the same issue and it affects all my adobe software.  You are not alone as I have seen several postings looking for the answer to this help request.

  • Display some constant in the input field and allow the user to change it.

    Dear All,
    I have a requirement in WDA to display inputfield with some constant initially and allow
    the user to change that value according to his wish.Currently I am using UI Element
    InputField for this,but I am not able to show the constant initially.
    How can I achieve this pls suggest.
    Thanks,
    Reddy.

    Hi sudhir,
    To display with default values, you need to write your code in wddointi method.
    Check this code..
    * navigate from <CONTEXT> to <INPUT> via lead selection
      lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    * get element via lead selection
      lo_el_input = lo_nd_input->get_element( ).
      lv_ship_point = '1001'.
    * set single attribute
      lo_el_input->set_attribute(
        name  =  `SHIP_POINT`
        value = lv_ship_point ).  // Now ship_point have initial value 1001.
    Cheers,
    Kris.

  • I "reply"ed to an e-mail message. The next time when I chose to write a new message and type the first letter of the person I replied to earlier, that name and e-mail address appears as a choice included in a pop up list of my contacts.

    I "reply"ed to an e-mail message. The next time when I chose to write a new message and type the first letter of the person I replied to earlier, that name and e-mail address appears as a choice included in a pop up list of my contacts. The persons name is not in my contacts and I would like to delete it from popping up. Do you know how I can do this?

    The Mail app on the iPad/iPhone/iPod Touch does have an option to clear previous recipients. You can learn to live with it.  But if you want to get rid of it, the only way to remove these cached email addresses from the Mail application is restoring the iPhone/iPod Touch as a new phone/iPod.  If you restore from backup, the cache is also restored.
    This article shows you the screens you will see during the restore:  http://support.apple.com/kb/HT1414

  • Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?

    Message title says it: Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?
    I can't find anything in the Knowledge Base that says these two options no longer work or still do.
    I do not have a system capable of running Lion, but I need to know the answer nonetheless.

    Gee, I don't know: "paste attachments mail Lion"? ;-)
    One further question, if I may: in Panther (which is where I've aggregated nearly 7 years of mail), if you copy more than one file in the Finder, switch to Mail, and paste the files into a new message, only the file names paste in. If you copy one file and paste it into a Mail message, you get the file, not just the name. Is that still true, or has that (IMHO) bug been fixed since 10.3.9?

  • Can I upload a simple iPhone App that all it does is direct the User to a Filemaker Pro URL   fmp://~filename.fmp?$VariableName=Value  This launches Filemaker Go and directs the user to the Database Hosted online   Right now there is no app store for

    Can I upload a simple iPhone App that all it does is direct the User to a Filemaker Pro URL   fmp://~filename.fmp?$VariableName=Value  This launches Filemaker Go and directs the user to the Database Hosted online
    Right now there is no app store for Filemaker Go.   Filemaker Forgot about us.
    So I want to create a simple native iPhone App that all it does
    is launch
    fmp://~/filename.fmp12?$VariableName=value
    This URL will launch the Filemaker Go App
    Filemaker Go is a app that the user will have to have
    downloaded already on the device..
    The Simple Native app will launch the Filemaker Go.
    The fmp  URL has the information where the Filemaker Pro database is hosted
    and get  the user where they need to be..
    Help Me please
    iPhone 5s, iOS 8.1.3

    That would be software. And, you said "upload." That's "uploading software." Why do you question what you stated?
    I don't know where you even want to upload this software. The only way it can be downloaded to a device is through the iTunes store. Do you even know what you want to do?

  • I want to forward a message with the default headers included, but can't seem to set my mail preferences to include the headers when forwarding, just the original message ends up in the forwarded message and not the headers?

    I want to forward a message with the default headers included, but can’t seem to set my mail preferences to include the headers when forwarding, just the original message ends up in the forwarded message and not the headers?  What I'm trying to do is report SPAM and add headers to a spam message to forward to sites that go after the spammers.

    Did you check the article and the add-on mentioned there?

  • Have been here before but still have not resolved a fix for a black screen when I try to access a PDF file...Now I've got a new iPad and need the User Guide which is only available inPDF

    Have been here before but still have not resolved a fix for a black screen when I try to access a PDF file using Safari...Now I've got a new iPad and need the User Guide which is only available in PDF and FireFox will not work.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * On Windows you can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac you can open Firefox 4.0+ in Safe Mode by holding the '''option''' key while starting Firefox.
    * On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    [[Image:FirefoxSafeMode|width=520]]
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
    Thank you.

  • How to add a field to the selection screen and when the user enters ...

    hi all,
    can any one plesase send the code of how to add a field to seletiion screen and when the user enters in the field , it should be store in the database table , the table is MKPF and the field is BKTXT.  Thanks.

    Hi Kripa,
       If u r using PNP ldb then the screen u will get is the screen for that ldb and if u want to add some more fields then u define using selection-screen..as follows
    SELECTION-SCREEN BEGIN OF BLOCK mysel WITH FRAME TITLE text-111.
    PARAMETERS: n_in_en  RADIOBUTTON GROUP g1,
                q_ev  RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK mysel.
    SELECTION-SCREEN BEGIN OF BLOCK mysel1 WITH FRAME TITLE text-222.
    PARAMETERS: r_date TYPE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN END OF BLOCK mysel1.
    SELECTION-SCREEN BEGIN OF BLOCK mysel2 WITH FRAME TITLE text-333.
    PARAMETERS:f_ver(3) TYPE c DEFAULT 1,
               c_no(10) TYPE c DEFAULT '9D0161',
               u_id(15) TYPE c,
               password(15) TYPE c,
               r_email(30) TYPE c DEFAULT PARAMETERS: s_not TYPE c AS CHECKBOX.
    PARAMETERS:t_run TYPE c  AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK mysel2.
    SELECTION-SCREEN BEGIN OF BLOCK mysel3 WITH FRAME TITLE text-444.
    SELECTION-SCREEN BEGIN OF BLOCK mysel4 WITH FRAME TITLE text-555.
    PARAMETERS: p_ser  RADIOBUTTON GROUP g2,
    a_ser  RADIOBUTTON GROUP g2.
    SELECTION-SCREEN END OF BLOCK mysel4.
    SELECTION-SCREEN BEGIN OF BLOCK mysel5 WITH FRAME TITLE text-666.
    PARAMETERS:p_path TYPE string.
    SELECTION-SCREEN END OF BLOCK mysel5.
    SELECTION-SCREEN END OF BLOCK mysel3.
    u will get this additional screen after the screen of ldb.
    I hope this will help u..
    Thanks & Regards
    Ashu Singh.

  • How can i check messages sent to device through my Verizon account online? i want to open the messages and see the contents.

    How can i check messages sent to device through my Verizon account online? i want to open the messages and see the contents.

        I know it's beneficial to be able to check your message content ArmyQueer. Verizon messages offers a wide variety of convenient options to manage messaging. What make and model device is this? When did you download the application on it? Please be aware you will only be able to see content after the app had been downloaded and installed. Content prior to the app being active will not be available. Here's a link with additional info. http://vz.to/1k3gBxd
    JonathanK_VZW
    VZWSupport
    Follow Us on Twitter@VZWSupport

  • HT4061 I need help, I pluged my iphone and itunes said there was an update to download and update, I did but when itunes was rebooting and updating I got an error message. and now the phone is telling me that it cant be activated.

    I need help, I pluged my iphone to itunes and got a message that said there was an update to download and update, I did but when itunes was rebooting and updating I got an error message. and now the phone is telling me that it cant be activated, to plug it in to itunes or to contact support care.

    That message usually indicates that your phone was hacked to unlock it from the original phone carrier, then when you updated or restored it locked back to that carrier.

  • Automatically highlight the next message and remove the "unread" status

    In my inbox on Ipad, when I  swipe and delete a  message or highlight the message and hit the delete icon in the upper right corner, it will automatically highlight the next message and remove the "unread" bullet next to the message. This is version 7.1. Is there a way tnot to have your messages marked as unread when you haven't read them yet?

    You can hit the small flag icon and mark it as unread yourself.

Maybe you are looking for

  • Dump : COMPUTE_INT_PLUS_OVERFLOW

    Hi experts, I am getting a dump COMPUTE_INT_PLUS_OVERFLOW in a report. its at the line: z1 = z1 + z1. Dump says: "Using + or 'ADD' to add the values 2060095488 and 2060095488 resulted in a value greater than 2147483647 or samller than -2147483648. Th

  • Datagrid itemrenderer multiple use

    Hopefully a straightforward and easy to answer question, I have a datagrid with an item renderer, like so <mx:DataGrid id="dg1" x="371" y="97" creationComplete="dg1.dataProvider = getStuff.lastResult.info">         <mx:columns>             <mx:DataGr

  • Error thrown in FDKSession class...

    Hi,<br> <br> I am Getting the following exception inside the construction of oracle.ifs.examples.content.fdk.FdkSession class., at the line <b>"int statuscode = response.getStatusCode();"</b> <br><br> 06/11/16 14:28:52 java.net.ProtocolException: Mis

  • I have CS 6 ext , I have uninstaled it and tryed to reinstal  and it says I used all my instals  ?

    Cs6 ext ( windows 7_64  it first started with sending files from Lr5 to cs6 kept saying LR could not open Cs6 after the worng it dose open it . so I installed it  Like Adobe says and tried to re instal and it says all installations have been used up

  • I can't find youtube after I updated to 6.0

    I just updated and I look for youtube and poof it's gone. I use it everyday and I know I can go on youtube via safari but it is easier using the app and I would like to know how to get it back.