THREAD ...question  ...again and again and again ....

Dear Friends ...
I would like to do a loop in a program
my program is something like this
try {something A}
catch ...
wait 1 second
try {something B}
catch ...
wait 1 second
try {something C}
catch ...
wait 1 second
try {something D}
catch ...
wait 1 second
and now start again .....
try {something A}
catch ...
wait 1 second
try {something B}
catch ...
wait 1 second
.......n
until i stop it for example using a key or something
please give some answer to start....
thank you very much

Why won't this work?
boolean flag = true;
while(flag){
try {something A
Thread.sleep(1000);//put this in each try
catch ...
wait 1 second
try {something B}
catch ...
wait 1 second
try {something C}
catch ...
wait 1 second
try {something D}
catch ...
wait 1 second
public void keyPressed(KeyEvent evt){
int key = evt.getKeyCode();
if(key == VK_ENTER){
flag = false;
}

Similar Messages

  • I can not log in to the account from the iTunes Store's why I lost my security question! I want to modify the security question again I can not

    I can not log in to the account from the iTunes Store's why I lost my security question! I want to modify the security question again I can not

    BLANK Cloud Screen http://forums.adobe.com/message/5484303
    -and http://helpx.adobe.com/creative-cloud/kb/blank-white-screen-ccp.html

  • I'm loathed to ask the same question again about the ITunes library not syncing with my iPod but having just done a complete restore, ensuring the tracks are in AAC format.. There are still problems.. Apple are there with the tutorials..but no solvings!!!

    I'm using iPod 4th Gen iOS 6.1.3 and an iMac with 11.3 .. All latest versions. I have 23.4gb music according to the file but when I attached the iPod the bar at the foot of the page says 18.3gb. Some tracks are missing. Most if not all have been ripped from cd's into iTunes which is creating AAC format for each track. Other tracks play fine, some show the song but not the Artist and vice versa.
    I have tried dragging the tracks from the Mac library to the IPod music file..nothing. So I go to Safari, type the question in and read the same problems over.. Are Apple aware of their Tutorials without troubleshooting pages ?    Do they care? 
    My Pioneer DDJ/T1 is set up with Traktor and only wants to work with iTunes..  So iTunes are edging themselves in everywhere for everything... But it's still not working as it should..
    Anyone have any clues please... Tried most all the ideas so far...

    1) This is because of software version 1.1. See this
    thread for some options as to how to go back to 1.0,
    which will correct the problem...
    http://discussions.apple.com/thread.jspa?threadID=3754
    59&tstart=0
    2) This tends to happen after videos. Give the iPod a
    minute or two to readjust. It should now be more
    accurate.
    3) This?
    iPod shows a folder icon with exclamation
    point
    4) Restore the iPod
    5) Try these...
    iPod Only Shows An Apple Logo and Will Not Start
    Up
    iPod Only Shows An Apple Logo
    I think 3,4, and 5 are related. Try the options I
    posted for each one.
    btabz
    I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again

  • I want to know how to clear the text area by the push off my next question button and ask a new ques

    I want to know how to clear the text area by the push off my next question button and ask a new question - also I want to know how to code in my project to where a user can enter a math question in one border container and the answer enters into the next container
    heres my code so far
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" backgroundColor="#1E5C75">
        <fx:Script>
            <![CDATA[
                protected function button1_clickHandler(event:MouseEvent):void
                    //convert text area into labelid to be identified by actionscript
                    richTextLabel.text = myArea.text;
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <!--container 1-->
        <s:BorderContainer borderWeight="7" x="28" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
            <!--data Entry control-->
            <s:TextArea id="myArea" width="153" height="68"/>
            <!--end of data entry control-->
            <s:Button width="151" label="ask a question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        <!--container2-->
        <s:BorderContainer borderWeight="7" x="509" y="10" width="200" height="138">
            <s:layout>
                <s:VerticalLayout paddingTop="10" paddingBottom="10"
                                  paddingLeft="10" paddingRight="10"/>
            </s:layout>
    <!--data entry control-->
            <!--convert tne data entry control into a label id in actionscript-->
            <s:Label id="richTextLabel" width="153" height="68"/>
            <s:Button width="151" label="next question" click="button1_clickHandler(event)"/>
        </s:BorderContainer>
        </s:Application>

    This is a user to user support forum.  We are all iphone users just like you.
    You are not addressing Apple here at all.
    This is an odd way to ask your fellow iphone users for help. Berating oterh users will not help you.
    "it's too fragile"
    No it is not.  i have never damaged one, nor has anyone I know.
    " U loose data when Ur phone is locked"
    No you don't.  Why do you think this?
    "and there is no customer support!!!  "
    Wrong yet again.  Apple has an 800 number and they have many retail stores and they have support articles that you can access using the search bar. Or you can contact them throgh express lane online
    "but I will go back with Blackberry "
    Please do.
    Good ridance

  • Had to reinstall lion because of my error, but now a lot of apps. are showing up on my dock as question marks and will not open.

    Had to reinstall lion because of my error, but now a lot of apps. are showing up on my dock as question marks and will not open.

    Ive gotten the question mark icon thing, and I just took them off the dock and redragged them onto the dock from the Applications folder again and they worked fine.  Mine were a couple of game type programs nothing major yet.  Just wanted to throw that out there though since I had that happen with a few dock icons.

  • Installed new hdd in MacBook Air 2008, question folder and forbidden sign in screen, what to do?

    Hello
    I installed new hard drive to my MacBook Air 2008 and when I try to install lion/snow leopard/ mavericks it won't show up the disk. I can't find the hard drive.
    I don't now what to do. I tried everything. I spoke with a guy in macsupport here in Sweden and he said I have to buy snow leopard and install it from the original dvd in order for computer to format. My computer is old like I said its from 2008. I've never update it or upgrade. This is first time. It laid in storage for three years so I decide it to use it again but hdd was damaged so I had to change it, and now all I get is flashing question folder and forbidden sign, you know the sign for auto traffic.
    Is it true that the only way to restore or to find the new hdd or to boot the question mark and forbidden sign marks by installing osx from its original dvd or buy snow leopard?
    After I spoke with the guy from Mac support, I got little suspicious so I spoke to another one and he told me all I need to do is format hdd with the help of a sata hdd cable with help of another macbook and then I was good to go.
    What do u think?
    Should I buy snow leopard or can I burn it from my sister computer?

    I first would try Target Disk Mode to format and install an OSX on the new storage drive.
    http://support.apple.com/kb/ht1661
    You will need a OSX source that is compatible with the MBA.  If you have the original, use that.
    Ciao.

  • Startup Failure (Blinking Question Mark) and more.....

    Hi,
    I have a G4 iBook that has a problem, with the hard drive I think, but I want to see if anyone has run into this problem. A search of the board didn't yeild much. Anyway, what happens is if I boot the iBook up it will get to a small folder icon with a flashing question mark and mac face. I realize this is an indicator that the startup drive isn't found. If I pinch the lower left corner during a startup then the iBook boots properly. Has anyone seen this behavior before?
    Thanks,
    Steve

    Hi love, I had this problem last october. When I bought my Mac it was an ex-display model with a new hard drive (August 2004). Last October 2006 I restarted my mac only for it to come up with the flashy finder folder / question mark. I was told that this means the Mac can't access the OS - apparently (not gospel!) this means that either your OS is being a bum or your hard drive has died, meaning that your mac can't access the OS 'cos obviously it's stored on your hard drive. I'm not sure how much of that is correct, however when I sent it off for repair, it came back with a new hard drive. I'd also like to say at this point that the Hardware test disk said my Hard Drive was OK but that when I connected my Mac to another Mac via firewire to try and retreive my data it could not access the hard disk.
    Sorry to break the bad news to you but it's very very likely you'll need a new hard drive. I am suffering at the moment 'cos my hard drive died again about 3 weeks ago, I got it back 10 days ago and it's gone again now. I have a week before I finish my degree and all my assignments were on there! (Naturally the ones I'd done this week hadn't been backed up yet!)
    Good luck with your Mac, let us know how it goes

  • Threads, Process, exec( ), and destroy( )

    I have the following code:
    public class A extends Thread
      private Process   myProcess;
      public synchronized void killProcess()
        if(myProcess != null)
           myProcess.destroy();
      public void run()
            try
              synchronized(this)
                myProcess = Runtime.getRuntime().exec( "some process");
                ...... code to handle streams ..........
              myProcess.waitFor();         
            catch(Exception e)
              e.printStackTrace();
    }One thread will be creating a Process and then waiting for it to finish. Another thread may
    determine that the process needs to be destroyed. I cannot put the call to waitFor( ) in the
    syncrhonized block bacause that would block any other operation on the Process.
    Is it ok that two threads will be using the same reference at the same time?
    Do you think there is any other problem with this code?
    Thanks in advance!

    Doesnt look that good, however an important thing you
    forgot so far if multiple threads are using the inner
    var myProcess - you not only have to synchronize your
    thread itself (methods) but also the object myProcess
    too...Not really. Whoever wants to access the myProcess variable will have to go through killProcess which
    is synchronized. So there is no way two threads can access this variable at the same time.
    Well.. no way other than what my original question is: one thread calling waitFor( ) and another tread calling destroy( ).
    But since waitFor( ) blocks, I cannot synchronize it. Btw, I have actually tried this code and it does exactly what I want, but I am just not sure if it's likely to see any unpleasant surprises at some point.

  • Why is question blocked and not solved.

    Why is the question "Keep getting We noticed you may have signed in or signed out in another window. Click OK to reload your page. everytime I start firefox" blocked and not solved. I have had this problem ever since FF updated to ver 13. Is Mozilla going to fix this? I am using Win XP. None of the responses to the question resolve the issue for me.

    This question --> https://support.mozilla.org/en-US/questions/836545?s=Keep+getting+We+noticed+you+may+have+signed+in+or+signed+out+in+another+window.+Click+OK+to+reload+your+page.+everytime+I+start+firefox <br />
    is locked because the original question is over a year old. Advice given on prior Firefox versions may vary from advice given on current Firefox versions. Posting in more current similar questions with the same/similar topic may be allowed.
    Look for another similar thread/question or post a new question giving all of your details.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • I forgot my Apple ID security question answers and cannot contact iTunes support by phone. The only way I can ask for help is via email. How can I make that happen?             Thanks

    Hi! So I haven't used iTunes in a few months but I just got an iTunes gift card and want to make a purchase. iTunes redeemed it just fine but now that I want to make a purchase I am having problems. I can't remember my security question answers and iTunes is requesting them. I have two other verified emails but the are NOT rescue emails. I can't contact iTunes over the phone because my phone lines are out and are going to be out for a long time. The only way I can contact them is by email. How can I do this? Is there an easy way to just reset all my security questions? Please help a girl out. I just want my music!
    Thanks so much

    Alternatives to Reset Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Start here to find your country, and how you can contact Apple:
             Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Support in your country and ask to speak to Account Security.
              Customer Service: Contacting Apple for support.
    How to Manage your Apple ID: Manage My Apple ID

  • If I forgot my security questions/answers and I'm trying to buy on a new device but same Apple ID, what do I do?

    If I forgot my security questions/answers and I'm trying to buy on a new device but same Apple ID, what do I do?

    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities.
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service

  • I have two apple ID's but cannot remember the security question answers and the email address is no longer active - how can I access this account

    I have two apple ID's but cannot remember the security question answers and the email address is no longer active - how can I access this account as it seems to be the one my icloud space is attached to.  I haven't backed up my ipad or photos for a while. 

    Security questions:
    https://discussions.apple.com/docs/DOC-4551
    http://support.apple.com/kb/HT5312
    If you don’t know your security questions, phone Apple (using the number listed here:  http://support.apple.com/kb/HE57  ) and ask for the Account Security Team.
    About 2-step verification of your Apple ID:
    http://support.apple.com/kb/ht5570
    This is also useful:
    http://www.macworld.co.uk/ipad-iphone/news/?newsid=3463233&olo=email

  • G4 displays flashing question mark and blue face at start-up

    like the title says, my powerbook refuses to go to the desktop and instead gives me a dark screen and in the center you can just make out a folder icon and on the folder icon flashes a question mark and then that picasso-esque blue smiley face. these two images flash sequentially, one after another.
    this started happening about three days ago. the day it started, i got up, checked my email, and then shut the computer down. but then i saw the soft light flashing on the closed laptop that tells me that it is still on. so i figured that i hadn't completed the shut down process all the way. i opened the laptop and almost knocked it off the perch it was on. i grabbed it in time to prevent it from falling, but in the process i mashed some buttons with my thumb. when i turned on the computer, it briefly flashed the desktop and then went dark and started flashing the icons as i described above.
    i am in japan right now, so getting ahold of apple in the states is somewhat difficult. any amount of help is very much appreciated. i've already tried a full shutdown by taking the battery out and holding down the power button for 5 seconds, as described on the apple website. this didn't work. i'm not sure which version of OS i have, but i'm pretty sure it is at least 10.0. i got the computer last year right as tiger was coming out.

    also, the power icon on the power button is not showing any light, and it wasn't showing any light for a day or so before this event happened.

  • HT5312 I forgot my security question answers and answered wrong too many times so now it won't let me download anything even though I know my password, what do I do?

    I forgot my security question answers and answered wrong too many times so now it won't let me download anything even though I know my password, what do I do?

    You need to contact Apple to get the questions reset. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (95618)

  • I have a problem with iphoto (have a mac book pro): the icon in the dock appears with a question mark, and the application is gone!!! Can someone tell what's going on? Yesterday I had the same problem with itunes

    I have a problem with iphoto (have a mac book pro): the icon in the dock appears with a question mark, and the application is gone!!! Can someone tell what's going on? Yesterday I had the same problem with itunes: I downloaded the last version (it's free), but I cannot do the same with iphoto, and more important: I need to know what is happening!!! Please help me!

    Applications should not disappear all by themselves.
    If they are then that coud indicate serious problems with your hard drive.
    Backup everything up as quickly as possible.
    Using Disk Utility verify your system disk.
    Allan

  • Reading Question id and Answer ID in a survey

    Hi,
        I have the following input with me.
    1. Survey ID
    2. Survey Version
    3. Question Sequence number like 1,2,3,
    4. Answer Sequence number
    Now I have a requirement to read the question id and answer id which is generally in the below format.
    id_<guid> .
    Please let me know how can i retrieve the the question id and answer id with the above inputs.
    Regards,
    Manas.
    Edited by: manas sahoo on Aug 4, 2008 1:53 PM

    Hi
    I have seen your question ,i need the Question Id and Answer Id for survey,how did you achieve this requirement .please suggest me.

Maybe you are looking for