How to stop a dialog from running

I have an appliaction that opens a splash screen dialog when it starts.
I want to put a 'Cancel' button on the splash so that I can abort the application.
I wnat to know if there is any way to do this without calling System.exit()?

Hi,
You should be able to call dispose on the dialogs' parent which hopefully will be your main window. That should do it.
Regards,
Manfred.

Similar Messages

  • How to stop the Dialog from being dragged

    I was hoping that someone could tell me when calling a Dialog from Jframe, a how to stop the Dialog from being dragged
    while a dialog is showing.
    When it is visible I can still click and drag the Dialog
    I want to set it so you can not drag it until the dialog has be closed.

    If you don't have access to the parent frame, a "hack" that usually works:
    Frame frame = Frame.getFrames()[0];
    if (null != frame && frame instanceof JFrame){
    JFrame jf = (JFrame)frame;
    JDialog jd = new JDialog(jf, "title");
    ... code here ...
    As each JFrame (or Frame) is opened, its stored in the array of Frames that you can get. Same thing with Dialog.getDialogs(). Almost always, at least so far for me I've never had this problem, the [0] index is the main window opened, or the parent/top frame. I'd put the check in there to be safe and make sure its a JFrame and usually you'll only have the one JFrame.

  • How to stop as files from running until a certain frame

    Hi all,
    I have a simple flash game with two frames at the moment.
    Most of the stuff that happens is in as files linked to
    different movie clips.
    I orignially only had one frame my background frame and when
    testing I just press ctl+enter and bamm away it goes the
    actionscript runs as soon as the movie/game starts and ergo the
    game plays.
    My problem is this, I now want to have a start/home frame at
    the beginning (of course) which has the start game button on which
    when clicked THEN starts the game.
    Currently the game starts in the first frame along with the
    start button :(
    How do I stop the game running straight away and my first
    frame only contains the start button, which when clicked then goes
    to the 2nd frame and starts the game?
    Reagrds,
    Red.

    A friend resolved the issue for me;
    By renaming the main contrustor and calling this in the start
    button Example action script applied to the button:
    START OF ACTION SCRIPT
    import flash.events.MouseEvent;
    stop();
    startBTN.addEventListener(MouseEvent.CLICK, startClick);
    function startClick(event:MouseEvent):void
    trace ("Button clicked");
    gotoAndStop(2);
    gameGo();
    /*gameGo() is the renamed main document class, renaming it
    prevents it from been run instanly
    and it is called from the button*/
    END OF ACTION SCRIPT

  • How to stop a process from running and display a message

    I have a button that inserts data into a table based on bind variable selected on the page. I would like to add code to that button that will check to see if certain data already exists in the table, for that bind variable, and if that data already exists, stop the process and display a message that says "you have already inserted that information - bla bla bla". If not, continue inserting. What would be the best way to do this?
    Currently, the button is a plsql that inserts the data.
    Any help or examples would be greatly appreciated!
    mholman
    Edited by: user10488561 on Jul 27, 2009 8:48 AM

    Use a validation process for that. If the validation fails (data exists) the processes will not be run. If it doesn't then the processing will continue.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • We were wondering how you stop some apps from running with out deleting them something like a task manager and in my settings im missing the application button in it how do i get it back and stop some apps its making it run really slow

    how do you stop apps with out deleting them i have looked for something like a task manager and nothing and researched about it and it says to go into your settings and then click applications but i dont have one can someone please help[ me thank you

    Double click the Home button. The bottom row shows the recently used apps. Touch and hold the app until they all start to wiggle then tap the circled minus sign by apps you want to remove. Press the Home button to return to normal.
    However, that is recently used apps not apps doing something. Some apps will do things all the time/periodically like checking for Notification, new mail. Yu can turn those off in the apps themselves.
    Just what are you trying to accomplish?

  • How can I stop my battery from running out in my in my iphone 5 with the new i0s7

    how can I stop my battery from running at a super fast rate on my in my iphone 5 with the new i0s7, ever since I upgraded I am needing to charge up at least 3 times a day.

    https://discussions.apple.com/message/23361957#23361957

  • How to stop Time Machine from backing up Temp Files?

    Hi folks!
    I am trying to find out how to stop Time Machine from constantly backing up 'useless' temporary files accumulated from web browsing? Although I don't change or add large files to my HD, Time Machine backs up hundreds of MBs every hour. Those file amounts make sense when I consider that I browse a lot to YouTube, SoundCloud, etc to watch videos or listen to music - I just don't want them to be backed up.
    Under Time Machine Options I already excluded the following items from backups:
    ~/Library/Caches
    /Library/Caches
    ~/Downloads
    But even though I did this weeks ago, Time Machine stills finds large files to be backed up every hour and my only guess is that I am still missing a location where either Safari or Firefox - the two web browsers I use - store temporary files.
    Can you help?
    Thanks a lot in advance!

    oas2103 wrote:
    they come from my anti-virus software
    Are you sure you need that? There are no viruses that run on OSX. None. Zip. Zero.
    If you're running Windoze on your Mac, that's the same as running it on a PC, so it needs all the same anti-everything stuff you'd use on a PC.
    There is some "malware," such as Trojans, for Macs, though. But (unlike viruses that can get onto your system without your knowledge), you must approve their installation (via your Admin password) and/or operation (via the "This application was downloaded from the internet ..." prompt).
    Appropriately enough, some of these Trojans are included in pirated versions of Apple software, such as iWork!
    For the gory details, see Thomas Reed's [Mac Virus Guide|http://www.reedcorner.net/thomas/guides/macvirus].
    Thanks a lot again!
    You're quite welcome, and thanks for posting back.

  • Stopping a thread from running

    Hai
         I am new to java. It would be helpful for me if someone helps me out in doing this.
         Actually in my program ,I should
    i. Find out whether a particular file exists in the given directory or not.
    ii. If the file doesn't exist, my program should wait for certain timeframe and check for the same file again.
    iii. If the program cannot find the required file within the timeout specified, my application should exit.
         I have done (i) and (ii) using threads. But in the case of (iii), I came to know that stop() method is depricated.
         I am providing my code for a better understanding. Could you please let me know, what would be the best way to stop the thread from running after the timeout is reached in my program?
    Thanx in advance
    import java.io.File;
    public class Fileexists implements Runnable
    static Thread t;
    public static void main(String[] args)
         System.out.println("creation of object");     
         FileExists test = new FileExists();
         t = new Thread(test);
         t.start();
    // run method
    public void run()
         File f = new File("searchfile.txt");
         boolean b = f.exists();
    System.out.println();
    if(b == false)
    System.out.println("Required file doesnot exists");
    try
         t.sleep(20000);
    catch (InterruptedException e)
         // TODO Auto-generated catch block
         e.printStackTrace();
              t.run();
    else
    System.out.println("Required file found");
    } // end of run()
    } // end of FileExists class

    Actually your use of threads is a difference which makes no difference. The JVM starts an initial thread and runs your main(), at the end of which you start a thread and return. So you've just replaced one thread with another. There's no parallel processing.
    The t.run() at the end of your run() method won't work. A particular Thread object can only run once. It will give you an IllegalStateException.
    I can't see how multi-threading will help you with this task at all, all you need is a simple loop with a Thread.sleep in it.
    If you really want to use a separate thread or Timer to implement a timeout (as an exercise) then use Thread.interrupt() to wind up a thread. The looping thread should test with Thread.interrupted() in it's loop condition, if it's in sleep() when interrupted an InterruptedException will be thrown which you should catch and allow to break the loop and let the thread terminate.
    So your loop structure looks like:
    try {
    while(!Thread.interrupted()) {
        ...  do your test
        Thread.sleep(.....);
      System.out.println("Thread terminated by detecting interrupted");
      } catch(InterruptedException ex)  {
         System.out.println("Thread interrupted from sleep");
    You can get the Thread for the main thread simply by storing Thread.currentThread() in a Thread reference.
    I'd suggest using a java.util.Timer to launch your time-out and leave the loop on the main thread started by the JVM.

  • How to stop the executable from starting when opened

    Hi Guys,
    I am building an exe with the application builder. I am not able to find a way to stop the exe from running when opened. I dont need the exe to run. I know I m missing a very basic step here but I m not able to do that.
    Could anyone explain me how to do this.
    Regards,
    Nitin

    Hello,
    This is Dominic L. from Applications Engineering at National Instruments. This was reported to R&D (CAR#41DAPUQU) and was fixed in LabVIEW 8.2.1. Here is a link to the current evaluation software download for LabVIEW:
    http://digital.ni.com/demo.nsf/websearch/14f9ce475127ade786256ac60070926c?opendocument
    This particular bug actually renders all the build options for source file settings unusable. While the other options can be set manually in the source VI properties, the start-up VI will always run when an executable is opened.
    Here are three different workarounds to this:
    Option 1 - Upgrade to 8.2.1. 
    Option 2 - Check "Enable debugging" and "Wait for debugger on launch" in the Advanced page of the build specification. One side effect is this will include the block diagrams of the VIs and extra code for debug tool support. Note that if you don't protect the source code (block diagram), it kind of defeats the purpose of creating an executable.
    Option 3 - Use a dummy startup VI to launch the desired startup VI.
    For the third workaround, the attached "Dummy Startup VI.vi" uses VI server to open the desired startup VI's front panel and then closes.  To use the Dummy Startup VI follow these steps:
    Add the Dummy Startup VI to the project.
    Open the Dummy Startup VI and change "Main VI.vi" to the VI you would like to open but not run in the project and save.
    In the source files page of the build, select the Dummy Startup VI as a startup VI and the VI you would like to open but not run as a support VI.
    Build and run.
    I hope this helps.
    Have a great evening!
    Best Regards,
    Dominic L.
    Attachments:
    Dummy Startup VI.vi ‏12 KB

  • How to stop the Browser from caching my web pages

    Hi There
    Can anyone tell how to stop the browser from caching my jsp pages
    I am using
    <%response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    but this does not work anduser is able to go back to the previous page
    which i dont want and i want the browser to display the message the page has expired
    Help appreciated
    Thanks
    Mumtaz

    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
    I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
    Srinivasan Ranganathan

  • How to stop  the users from changing the Decimal in SAP

    How  to stop  the users from changing User Profile

    Hai,
    It is not possible to restrict SU3 to display, because it has only S_TCODE has the authorization object.
    If you really want to restrict users from changing their profile you have to remove the SU3 access and give SU1 or SU2 which gives access only to Personnel details and Parameters.
    Hope this helps.
    Regards,
    Yoganand.V

  • How to stop the Calendar from editing your input?

    How to stop the Calendar from editing your input?

    I am constantly finding that Calendar Version 8.0 thinks it knows what I want to type but it incorrectly takes numbers and days and times out of my input and changes my appointments. I hate this new supposedly "smart" feature. Even when I edit my event correctly a second or third time it rewrites my input incorrectly again. I have to use my iPhone to override the annoying editing on my mac. I am ready to find a new calendar program unless Apple allows users to input what they want without their information being incorrectly edited.

  • How to stop the dock from showing all hidden images when hiding then showing applications

    How to stop the dock from showing all hidden images when hiding then showing applications

    It's not really something to snap a screen shot of. I believe it would need to be a video clip. For instance, when I am working on multiple images in Photoshop, I often need many images open at the same time, but I only have one image viewable and active. The hero image is active on screen while I hide the other images in the dock by hitting the yellow - button on the images. Then I "Hide" Photoshop to do something in the Finder. When I go back to Photoshop, every image that is hidden in the dock will pop open again in the active window, not just the image I was currently working on. I want these images to stay in the dock until I need them, no matter how many times I Hide the Show Photoshop.

  • How to stop PR creation from PM work order for a particular vendor?

    Hello Experts,
    We have following scenario for breakdown maintenance activities.
    When a machine breaks down, a breakdown order is created in SAP. The external manintenance services are planned in the order. When the order is released, a single PR (with multiple item numbers corresponding to number of services) is created by SAP. The PR has a release strategy. When PR is released, PO is created followed by the SES.
    The practice followed AS -IS for breakdown outside business hours:- If the breakdown happens outside business working hours, the person releasing the PRs is not available & hence PR can not be released resulting in no PO & no subsequent SES.
    In this case, the maintenance is completed by the external agency & the work order is TECO. The next day, TECO is reveresed, new PR is created, released, converted into PO, & then SES.
    TO-BE process:- Client expects that, for certain vendors identified, PR should not get created at all from the breakdown order. (The list of  vendors will be maintained seperately). For these vendors, a framework order will be created at the start of fiscal year & SES will be created as & when required agaainst the framework order.
    My concern is :- How to stop PR creation from PM work order for a particular vendor? OR delete the created PR?
    Highly appreciate your quick response.
    Thank you.
    Amit
    Note:- My ABAP consultant has checked following BADI's, but could not find it useful.
    IWO1_ORDER_BADI
    ORDER_COSTING_CK
    DATA_EXTENSION_CK
    VALUATION_CK
    ME_REQ_OI_EXT
    IWO1_PREQ_BADI
    ME_CHECK_SOURCES
    ME_REQ_POSTED
    IWO1_ORDER_BADI

    Dear Amit
    I am giving a different dimension to your question check if it fulfills your requirement -
    As we know Vendor selection comes at a later stage only after your PR creation, approval & RFQ etc. & PR generation from maintaine. order is controllled through control key PM03.  While triggering PR from order you have to specify Material group, Purchase group and vendor. Try to control it through authorisation as all these are authorisation objects. The persons executing breakdown order shall no t be given this authoriations
    shakti

  • Can anyone please tell me how to stop email previews from appearing on my screen. I have turned off the preview option in settings on both my ipad and iphone, but they still keep appearing.  Thanks

    Can anyone please tell me how to stop email previews from appearing on my screen. I have turned off the preview option in settings on both my ipad and iphone, but they still keep appearing.  Thanks

    works ok on mine - (5, 7.1.1).  Try again.  with previews set to none, mine shows the sender and the subject line only.  (you cannot get rid of the subject)    with the other settings, you get the sender, subject line and however many lines you selected.

Maybe you are looking for

  • I looked at my payment info and now my itunes card balance has disappeared. How do I get it back?

    I looked at my payment info in itunes and I had a $15 itunes card scanned in. When I went to take my credit card off my itunes balance disappeared. I cannot find the balance anymore. I already threw the card away. How can I get my balance back?

  • Integration repository error

    Hi All, When i tried to run t-code SXMB_IFR to run integration repository, in the web-browser, i am getting the following error. can anyone help me. the error details is as below: Exception Details Exception class: com.sap.aii.utilxi.prop.api.Propert

  • Delphi 2007 and CR 2008

    Hello everyone, This is my first post on Business Objects forum... I would like to know if there is a way to use CR2008 in Delphi 2007. I have read that the RDC is not available for CR2008 but only for the XI release 2. Thanks in advance for your rep

  • WLC2006 keeps on locking up

    Recently, I have a AIR-WLC2006 that is running the code AIR-WLC2006-K9-4-1-181-0.aes I noticed that it locks up intermittently and does not response to console or whatsoever after a few days of operation. Anyone else facing the same problem? I have t

  • Displaying fixed message when deploying package

    Hi! I'm using SCCM 2012 and it works fine and all but I wonder if there is a possibility to play with some messages for the user? For example, when I'm deploying a Java package I would like to display a fixed message to the user like: "The system is