Can someone point me to a small working example using wait()

Or is wait() what I want to use?
I need to have my app go to sleep for some period of time, say ten or fifteen minutes, and hide its window during that time. Then after that ten minutes it opens its window back up.
I've looked all over Google and I can't find any code samples that a newbie could make sense of. Can anyone point me to a sample?
I wrote what I thought, intuitively, was the way to do it, but I am getting some cryptic message on the "wait()" about "java.lang.IllegalMonitorStateException" which I looked up, but the "explanation" makes even less sense than the raw message. :(
  public void runLoop() {
    getPrefs();
    while (true) {
      ... do stuff ...
      try {
        wait(1000*timeOut);
      } catch ( InterruptedException ie )  {
        ... do stuff ...
  }thanks for any guidance.
--gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Can someone PLEASE point me to a working example?
I use Java only very rarely, and only when forced to, and I am not an expert. Frankly, in spite of being expert in a dozen other languages I am COMPLETELY INCOMPETENT in Java. I'm just trying to get this project done and out of my hair so I can safely forget all about Java for the next year or two. I'd give the project to someone else, but every other coder in the shop refuses to go anywhere near Java.
If I can get this one thing working I can call the project done and be out of here.
I have a working ap that just needs to close its own window when a button is clicked, for some (user specified) period of time like 10 or 15 minutes, and then reopen its window after that period of time. It is intuitively obvious that I should be able to use timer methods, or sleep() , or wait(), but I have not been able to get any of those to work, and the error messages are more cryptic than ancient Sumerian cuneiform.
I've Googled for a working example, but haven't found anything that I can figure out. The examples I've found presuppose far more expertise than I posses, and have far too many pieces missing. Can anyone just point me to a complete example of an ap that sleeps for some period of time and then wakes up again?
I would really, really appreciate the help, and once I've finished this project I promise I won't ever bother you again. Really.
--gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Can someone point my to the support doc about using 2 iPods on 1 PC?

    Hi
    I have a 30gb Vid and the missus a Shuffle, how can I use both on one PC?
    Can someone pont me to a support doc, I canby find one anywhere
    cheers

    using windows xp you need to first put your library in a central location. ex.
    C:\Music
    by default in iTunes stores in C:\documents and settings\user\documents\My music\itunes Library.
    You can change this under your preferences\ advanced window in iTunes.
    instructions are here http://docs.info.apple.com/article.html?artnum=301748
    In windows control panel you will need to create a second user account and then load iTunes and map your iTunes to the correct library location.
    I make sure that one user is "master account" meaning that, that is the account that I load all of the music into and organize through or you will find you will run out of HD space rather fast.
    Good luck. If you need clarification just ask. I've set up a couple of friends on shared computers for them

  • Can someone point me to a dynamic form example?

    I'm very new to JSF.
    Simply put, I want to be able to create a page that can have a dynamic form on it. A form with potentially several fields on it defined at run time. Making it even more exciting, it will ideally support the File Upload as well.
    Do I need to create an entire JSF component for that, or can I assemble standard JSF components at run time and present the page?
    Is there an example somewhere that someone could guide me to?

    take a look at: http://jroller.com/page/RickHigh/20051130

  • I'm new to Apple products. Can someone point me to where an applications user data is stored. For example: skype user data

    I've been searching through the various folders on my Mac Pro hard drive and cannot see where user data is stored.As an example, I deleed Skype and reloaded it and my old profile data is still available. but I cannot determine where it is stored. Can someone point me to whaere this type id data is stored

    Skype and other applications as well may store all their data within their application package. Or they store their data elsewhere such as the Documents folder, as I mentioned.
    There are hidden folders but they are system folders and files. There is no reason for you to ever access them.
    Skype may also store all that it needs to function in its /Home/Library/Preferences/ preference folder. The storage of any other produced data is located wherever the user designates.
    iPhoto stores your photos in the iPhoto Library which is found in your /Home/Pictures/ folder.

  • ___ Can someone point me to instructions to make custom 3D bevels for CS5? (Elf Shoe)

    ___ Can someone point me to instructions to make custom 3D bevels for CS5? (Elf Shoe)
    I'm drawing some elf cartoon characters, and I want to create some shoes, basically an elongated 'cookie' type of shape. This one shows the default 'rounded' bevel, but I want it the arc to be angled to give a more rounded top...

    I realized I needed to access package contents, access and resave bevel.ai - but I have no permissions on my workstation. Oh well, I guess there's no other way.

  • Plz can someone show me simple thread code work

    Plz can someone show me simple thread code work with main function, without any applet...thread including start(),run(), and stop(), am I right or not ??
    thx

    http://java.sun.com/docs/books/tutorial/essential/threads/index.html

  • Can someone point me in the direction of iPhone Programming Courses

    Ive never programmed anything except basic HTML but I would really like to learn how to program for the iPhone can someone point me in the direction for any Online Courses for learning Objective C?

    I dont thank you mean learning c++ or C#, I think you would just like to know how to create basic apps. Well I would like to do the same thing. Check out this link ( http://ifones.com/apple-iphone-sdk-tutorial-top-picks/ ) it should point you in the right direction like it did for me.
    Enjoy!

  • Can someone point me to a picture of playlist selection on 4g ipod nano?

    Hi, my wife is traveling and before she left, I loaded her 4g nano with playlists from itunes, but she emailed and says there is no menu selection for playlists, just artists and albums. can someone point me to some graphical instructions or a display of the playlist selection on the nano (that i can then point her too?). I use an iphone, and it's right there at the bottom of the screen, but i have no idea where on the clickwheel you have to go. I emailed her the Apple UG for that model, but I can barely decifer it myself, so a picture tut would really help. thx!!!
    coocoo

    hi
    depending on how complicated your shot is, you may be able to get away with simply placing the image within the frame on top of the background shot. Then resize down to fit. You may then need to tweak its corners using the corner pin tool to get it to sit in the right perspective plane. You may find you need to soften the edges of the top layer image so its not so sharp and hard. For this you probably would need to add a mask and soften its edges. Then you might need to add some noise and/or colour correction to make it sit naturally with the background image. and finally if there are any shadows cast over the picture frame you will need to add them back over the new image. You can use a black shape, with its opacity cranked down with a blur filter on it.
    The manual describes all of these process pretty well.
    hth
    adam

  • Can someone point me to vsphere api to delete portgroup on a distributed virtual switch usoing vsphere api.I need the api or example to programmatically delete distributed portgroups

    can someone point me to vsphere api to delete portgroup on a distributed virtual switch usoing vsphere api.Please post this to another forum if needed

    Or atleast, how do you do a table export using dbms_datapump ?

  • Can someone point me to a tutorial on image masking and alpha channels?

    Can someone point me to a tutorial on image masking and alpha channels?
    Goal is to make a picture in a picture frame become a moving image.
    I am trying now to figure out how to make a hole in a video by subtracting a 16x9 sized rectangle.
    Thanks.

    hi
    depending on how complicated your shot is, you may be able to get away with simply placing the image within the frame on top of the background shot. Then resize down to fit. You may then need to tweak its corners using the corner pin tool to get it to sit in the right perspective plane. You may find you need to soften the edges of the top layer image so its not so sharp and hard. For this you probably would need to add a mask and soften its edges. Then you might need to add some noise and/or colour correction to make it sit naturally with the background image. and finally if there are any shadows cast over the picture frame you will need to add them back over the new image. You can use a black shape, with its opacity cranked down with a blur filter on it.
    The manual describes all of these process pretty well.
    hth
    adam

  • Hello I really want to start developing apps but have no knowledge of development I know it's one of those things you have to start somewhere and build on it but can someone point me in the right direction of where I should begin such as books etc

    Hello I really want to start developing apps but have no knowledge of development I know it's one of those things you have to start somewhere and build on it but can someone point me in the right direction of where I should begin such as books etc

    iOS or Mac apps?
    Have you paid the fee to sign up as a developer yet?
    Ken

  • Can someone access my email through iCloud if they used to have access to my email?

    Can someone access my email through iCloud if they used to have access to my email?

    Your question is not clear. If it is a Yahoo email account, then where does iCloud come into the picture? Or do you mean you are using the yahoo.com email address as your Apple ID? These are entirely different things. The Yahoo email account is not in any way related to the Apple ID that is using that email address as the Apple ID.
    Cheers,
    GB

  • Looking for working example using javafx.builders.HttpRequestBuilder

    Hi,
    Is there any working example using javafx.builders.HttpRequestBuilder and javafx.io.http.HttpRequest to communicate with application server?
    Thanks in advance.
    LD

    Hi,
    Is there any working example using javafx.builders.HttpRequestBuilder and javafx.io.http.HttpRequest to communicate with application server?
    Thanks in advance.
    LD

  • Got wet while walking home in the rain it looks like everything is working fine except the touch screen ?can someone point me in the right direction to solve this problem or to get it fixed!

    Got wet walking home in the rain it looks like everything is working fine except the touch screen wont work. Can anybody point me in the right direction to solve this problem, or who to talk to about getting it fixed???

    Do not use, charge or turn on your iPod until it is dry:
    How to fix a wet iPod or iPhone | eHow.com

  • I want to go back to Firefox 3.6 so I can use Torbutton - but I cannot find it - please can someone point me to Firefox 3.6? Thanks

    Please can you point me to a place I can download the previous version of Firefox before version 4.0. The addon Torbutton is not compatible and I would rather have an older Firefox and still be able to use Torbutton. thanks

    Thanks TonyE. I tried that. But the alpha version does not appear to work.
    Please can someone just point me to the old FireFox? It was fine! I want it back!
    HELP....

Maybe you are looking for