Close dialog with a click outside it

How can I close a JDialog when the user clicks elsewhere? If it is modal, no mouse events are generated. With a non-modal dialog, I couldn't use FocusListener, the dialog looses focus just after it is made visible. MouseListener didn't worked too, a mouse event is generated by the same click that opened the dialog.
I feel this has to be simple, but... where is the road?

You could listen for window deactivation events.
But ... Closing a dialog when someone clicks outside it is very non-standard behavior. People expect that they have to take explicit action in response to a dialog, and not following that model is generally a bad idea. Consider the person who accidentally clicks outside the dialog -- perhaps to look for information in another window -- and then can't get back to where s/he was.

Similar Messages

  • Close dialog window by clicking on 'X'

    Hi
    I am displaying a dialog window that allows the user to modify data.
    When the user clicks on the 'Cancel' button I have placed on the window, the action code fires and the return listener fires.
    I have added some java script that executes the following command when the user closes the dialog by clicking on the close icon.
    submitForm("groupCaptureForm",0,{source:"cancelGroup"});
    Basically simulating a click on the 'Cancel' button.
    For some reason when the user closes the window by clicking on the close icon, the action code fires, but the return listener code never fires.
    Any idea why?

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Safari 5.1.7 Tab - How to close them with 1 click?

    I have just installed Safari 5.1.7.
    What happened to the X in the tabs to close them?
    I have looked in preferences, can't see any obvious way of restoring the missing "click on the X to close" option.
    I now have to right click & select close from a drop down list. That's nuts!
    I would love a solution to this before I end up reverting to version 5.1.6.

    If only it were that easy Barry.
    I've tried hovering and gave up after 20 seconds.
    I wasn't the first to use Safari after the upgrade to 5.1.7 & I wonder if the other user has some how managed to alter some obscure setting without knowing what she was doing.
    Anyone else have any ideas?

  • Close Tooltip with Click-outside

    I need a feature which allows me to close the tooltip with a click outside the tooltip (trigger & target).
    Am I overlooking something or is this really missing? (I don't want to do mousover and mouseout, the target needs to stay because it has furhter functionality inside the target; but with a click outside it needs to be able to be closed again).
    Any ideas? Will this feature be added soon?
    Thanks

    The drawback is that if you have multiple triggers, you have to click twice, one for exit the light bot and another one to trigger the trigger! This isn't very good as user experience...

  • In the bookmark panel, how can I close all bookmarks files with one click?

    Every time I want to have just the files on the panel I have to close them on by one to have a genéral view of my bookmarks organisation. It would be so nice to have a feature to close everything with one click. But so fa I have been unable to find a solution. Thanks if you can help!

    Maybe Autoclose Bookmark&History Folders: http://www.sephiroth-j.de/1/mozilla/#ac-btf

  • Af:popUp close when click outside popup area, Jdev 12c

    Hi! I had a similar post a long time ago and it became archived due to lack of time from my part, it was never answered
    the problem is:
    1)Popup without dialog tag: closes when a click is made outside the popup area.
    2)Popup with a dialog tag:  doesn't close when clicked outside the popup area
    I'd like to be able to let the user close the popup(with dialog) when he/she clicks outside the popup area.
    Thanks!

    User, which jdev version do you use?
    Why don't you use the popup without the dialog then?
    Can't be too hard to put some buttons ontp the popup.
    Timo

  • Close ADF Popup Dialog with html button in Inline Frame

    hi,
    I'm using jdev 11.1.1.2,
    I have a adf popup dialog which contains an Inline Frame(source is a jsp file).I want to close the dialog with a html submit button in the frame page. when the submit button is clicked, auto close the dialog.
    can anyone help in this.
    Thanks

    Try to close the popup from Javascript using a sciptlet similar to the following one:
    var popup = AdfPage.PAGE.findComponent('<yourPopupClientId>');
    if (popup.isPopupVisible()) {
      popup.hide();
    }where <tt><yourPopupClientId></tt> should be replaced with the popup's client ID. The client ID is composed of the popup's ID from the <af:popup> tag preceded with IDs of the eventual parent naming containers where the popup has been declared.
    For example, if the tag is <tt><af:popup id="myPopup"></tt>, then the clientId might be:
    <tt>  myPopup
      container1:myPopup
      container1:container2:myPopup</tt>
    ... and so on, depending on where you have defined the popup in your JSF page (i.e. within which naming containers), you should determine it first.

  • Unable to close open apps with double clicking the button and when I tap screen does not respond?

    Cannot not close open apps with double clicking the button Since downloading iOS8.

    What happens when you try? Does double clicking the ?home button bring up the Task Bar of recently used apps? If so what happens when you flick up on the preview screen for the app you want to close?
    To quit an app double click the Home button to reveal the row of recently used apps. Flick up on the page preview and it will fly away and disappear. That quits the app.

  • Windoe 7 Everytime when I close the brouwser by clicking on the x I get a message that a script on the page may be busy, or it maybe stopped responding. Continue or stop script. I never had this problem with XP Sincerely Wiliam email removed

    When I am done browsing I close the browser by clicking on the X. Since I use Window 7 I always get the message "A script on this page may be busy or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete"
    Script: chrome://bp/content/bp.js:857.
    If I continue it takes anywhere from 5 to 15 minutes to complete
    William <i><email removed - c></i>

    That will be due to an extension that is not working properly, possibly the Better Privacy extension. To test this, if you have Better Privacy installed try disabling it to see if the error stops appearing. To do that, in the Tools menu select Add-ons, then go to the Extensions panel, select Better Privacy in the list, then click on Disable. re-start Firefox to complete the process, then see if the error message appears.
    If you do not have Better Privacy installed, repeat this process with the other extensions until you find the culprit. First check any extensions with the initials bp.
    If it is Better Privacy, it should work with Firefox 3.6.13 on Windows 7. Make sure you have the latest version, also try uninstalling it and re-installing it, this may help if your version has become corrupted.

  • When I try to close the Firefox window, it is not closing. I have to click outside of the window and click back on the x button in order to close it.

    For example, if I type something into the Google search bar and then try to click on the minimize or close button, nothing happens. In order to close Firefox, I have to click ''outside'' the firefox window (on my desktop or task bar) and then I can click close. If I click inside the window again, I cannot close.

    You could exit Firefox from the File menu. You can also use Ctrl-Shift-W to close the window.

  • Close tabs and open links in new tab with middle click

    Until recently I was able to close tabs by middle clicking them or open new tabs by middle clicking them. Recently however Firefox either is no longer recognizing my middle clicks or is not processing them in the same way.
    I tried looking in the about:config functions for functions including 'middle' in an attempt to find the configuration option for this but didn't find anything. I need to identify how to configure it first so I can attempt that.

    I have this problem as well, and tried basically everything. Even a fresh install (didn't help). I have this issue (using the same Logitech LX3) since I switched from Firefox 3.x to 4.x and now 5.x, all on Windows 7.
    Basically, the middle mouse button behavior is totally unreliable. Most of the times, it doesn't work at all. However, sometimes it does, but then it may take up many seconds (keeping the middle button pressed) until the tab finally opens... and then it often opens multi. Sometimes the tab(s) open after X seconds while the middle mouse button is still pressed, sometimes it opens after the button was released.
    It seems to be a bit better in Private Browsing mode, though. Can't really be more specific: sometimes the middle mouse button opens the new tab after seconds in "using tab x, page y, link z", while it doesn't work on exactely that same page on "using tab x, page y, link z" after doing nothing for 5 minutes.

  • Check in dialog with Adobe Drive 4.2 doesn't work

    Hi,
    we are currently implementing a custom check-in dialog using Adobe Drive 4.2.
    The dialog looks like the example given in discussion "Custom check in dialog".
    To build the SWF, I use Flash Builder 4.5 with Adobe Flex SDK 4.0.0 (flex_sdk_4.0.0.14159A).
    I have created a new Flex Project with Application type "Web" and added a MXML Modul with name "CustomUI" and option "Do not optimize (module can be loaded by multiple applications)".
    After compiling the project I extract the "CustomUI.swf" and copy the file in the "resources" folder of my Custom Adobe Drive adapter.
    I implement the "IGetCustomCheckInUIHandler", "ICanEnableCustomCheckInUIHandler" and "IGetCustomCheckInUIContextInfoHandler":
    "IGetCustomCheckInUIHandler" sets the module url like
    response.setModuleURL(Thread.currentThread().getContextClassLoader().getResource("resource s/CustomUI.swf"));
    "ICanEnableCustomCheckInUIHandler" enables the custom ui dialog with
    response.setCanEnable(true);
    "IGetCustomCheckInUIContextInfoHandler" adds some context data like
    Map<String, Object> contextInfo = new HashMap<String, Object>();
    contextInfo.put("key1", "test1");
    response.setContextInfo(contextInfo);              
    (Also hidding the "IGetCustomCheckInUIContextInfoHandler" in "IRemoteHandlerFactory" doesn't work.)
    Right click on an checked out asset in Windows Explorer and click on "Adobe Drive 4/Check in..." does following:
    1. "IGetCustomCheckInUIHandler" called
    2. "ICanEnableCustomCheckInUIHandler" called
    3. "IGetCustomCheckInUIHandler" once more called
    4. "IGetCustomCheckInUIContextInfoHandler" called
    5. The default check in dialog is shown (with no custom ui extension), the default dialog hangs (OK/Cancel doesn't react on click, the dialog is freezed). Only the close button (X in the right upper corner) works.
    How is it possible to provide a custom ui check in dialog?
    Thanks

    Hi again.
    I found where the problem was (at least in my case).
    To go to the point: go in the "properties" of your flex project. In the menu, go in "Flex Build Path" and then in "Library Path". Then, the option "Framework linkage" is with the default value in a new flex project.
    So here is the trick : with Flex 3 (so Adobe Drive 3), the default value is "merged into code".  Bug in the Flex 4 (so Adobe Drive 5), the default value is "Runtime Shared Library".
    And because the module is ran independently (with no link with the flex code that load your module), the flash player crashes because it doesn't find your libraries (like ICustomCheckinUI).
    I discovered this problem running the Custom UI from the windows explorer (not with Bridge) and using the Flash Player Debug version, and watching the error log files of the Flash Player.
    So in the end, when I checked "merged into code" in the Framework Linkage option, all my dependencies of my flex module were merged into my final module swf, and no more flash crash.
    Sorry for my bad english and hope it helped.
    Guillaume
    (edit : screenshot at http://www.hostingpics.net/viewer.php?id=276932flexbuildpath.png )

  • Detect mouse down or click outside

    Hello,
    I'm trying to detect Mouse Down or Click event outside of a TextInput element.
    This doesn't work:
    myInput.addEventListener(FlexMouseEvent.MOUSE_DOWN_OUTSIDE,aHorseWalksIntoABarAndTheBarten derAsksHeyWhyTheLongFace);

    Hm... It's a custom TextInput component, I need to listen to this from inside it.
    How does DateField or DropDownList do this? They close the DateChooser and List when clicking outside.
    I saw something to do with mx_internal, but I'm not sure if I should be using that.

  • Restricting user to close dialog

    how to restrict user to close the dialog with the button on the top right corner of the dialog when we set Undecorate(true).?

    I'm not quite sure I follow you.
    If you're asking about an undecorated dialog without a close button then how can the user click it?
    If it has a close button then by default that's the only way to close the dialog. If you want to restrict them to closing it via that then just don't add in another means of closing it.

  • What html code will start an EXE (program) with a click on a webpage link?

    The code in bold below worked. After I switched my browser from IE 11 to Firefox to get the hover on hotspots to work, the program gave me this error message. I moved the EXE file to my local file folder and tried it as shown below. Still no success. Any suggestions?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Family Tree Charts</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><style type="text/css">
    <!--
    body,td,th {
        color: #000;
    -->
    </style></head>
    <body link=blue vlink=blue>
    <table width="100%" height="25" border="0" cellpadding="4" cellspacing="0">
      <tr>
        <td width="93%" height="27" bgcolor="#EFEFEF"> <div align="center"><font color="#999999">
        <b>This Software Allows You To Review Neat Charts of Your Family Tree </b></font></div></td>
        <td width="7%" bgcolor="#CCFFFF"> <div align="center"><A href="Mementos_Menu.html"><font size="2">Back</font></a></div></td>
      </tr>
    </table><BR><center>
    <br>
    <FONT color=#ff00ff><strong>Click the link below to download a special software program for your PC.</strong></FONT><br>
    <br>
    <a href="http://jdmcox.com/"><strong>Cox Website</strong></a><br><br>
    <strong>ITEM 1</strong> (AT THIS  WEBSITE) IS  THE <strong>FAMILY TREE CHART</strong> PROGRAM.<br>
    It is called <strong>Simple Family Tree</strong><br>
    <table width="80%" border="2" cellspacing="2" cellpadding="2">
      <tr>
        <td width="49%" align="left" valign="top"><FONT color=#ff00ff><strong>Click the link below to use this special software program after you download and install the program.</strong></FONT><br>
    <br>
    <!--<a href="C:\Program Files (x86)\Simple Family Tree\Simple Family Tree.exe"><strong>Family Tree Charts Program by Doug Cox</strong></a><br><FONT color=#ff00ff>
    -->
    <a href="C:\Users\Tom and Polly\Documents\Genealogy CD\Simple Family Tree\Simple Family Tree.exe"><b>Family Tree Charts Program</b></a><br><br>
    <FONT color=#ff00ff><strong>Click  the &quot;run&quot; button for both warning messages.<br>
    Click the &quot;READ THIS!&quot; menu option when the program opens.<br>
    Click  "X" in the upper right to close the program.<br><br>
    You can update the family data in future years with this program too.</strong></FONT>
    <br></td>
        <td width="51%" align="left" valign="top"><FONT color=#ff00ff><strong>NOTE 1: Be sure your HTML code for this webpage has a proper line to link to the location where the software was installed. You can use NOTEPAD to make HTML code changes. My existing line is: </strong></FONT><br>
          "c:\<u>program files (x86)</u>\simple family tree\simple family tree.exe"<br><br>
          <FONT color=#ff00ff><strong>The underlined portion will need to agree with where the program was installed. Just change the directory (see underlined sample above). Good luck. If I am still living, call me.<br><br>
          NOTE 2: After you download, install, and try to use the program, you may get an error message window that looks like this -&quot;0 FAMS @F191 @ FAM&quot;. This means you have an individual record in your GEDCOM file that does not have a parent. Be sure all GEDCOM records have at least one parent even if you must name the parent UNKNOWN.</strong></FONT></td>
      </tr>
    </table>
    <br></center> 
    <table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#CCCCCC">
        <tr>
          <td bgcolor="#EFEFEF"> <font size="2">&copy;2002 Sales and People</font></td>
        </tr>
    </table></body>
    </html>

    Herbert:
    Here is my latest code attempt, but I get messages about the lines in BOLD that I do not understand.
    Perhaps you will see what I need to fix. Sure appreciate what you have found and shared with such a neophyte (aka dumbo).
    Tom
    <!--
    body,td,th
    -->
    function RunExe(path) {
    try {
    var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf("msie") != -1) {
    MyObject = new ActiveXObject("WScript.Shell")
    MyObject.Run(path);
    } else {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    var exe = window.Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
    exe.initWithPath(path);
    var run = window.Components.classes['@mozilla.org/process/util;1'].createInstance(Components.inteinterfaces.nsIProcess);
    run.init(exe);
    var parameters = ["/c start Simple Family Tree.exe"];
    run.run(false, parameters, parameters.length);
    } catch (ex) {
    alert(ex.toString());
    This Software Allows You To Review Neat Charts of Your Family Tree
    Back
    Click the link below to download a special software program for your PC and your GED file.
    *Cox Website*
    ITEM 1 (AT HIS  WEBSITE) IS  HIS FAMILY TREE CHART PROGRAM.
    It is called Simple Family Tree
    Click the link below to look at my GEDCOM file contents.<br>Instructions are provided in the READ THIS menu option at the top of the window.
      *Show Yarnall Chart*
    *Return to this webpage by clicking on the backarrow after looking at the chart.
    You can update the family data in future years with this program too.*
    ©2002 Sales and People
    Date: Thu, 2 Jan 2014 02:09:18 -0800
    From: [email protected]
    To: [email protected]
    Subject: What html code will start an EXE (program) with a click on a webpage link?
        Re: What html code will start an EXE (program) with a click on a webpage link?
        created by Herbert2001 in Dreamweaver support forum - View the full discussion
    Perhaps this might be helpful:
    https://addons.mozilla.org/en-US/firefox/addon/opendownload-10902/
    It allows executables in Firefox to be run - it is an extenstion, though, so it must be installed in Firefox before your page will work.
    Another option is this solution, but it will still require a manual change in Firefox:
    http://forums.mozillazine.org/viewtopic.php?f=19&t=803615
    Or this: http://stackoverflow.com/questions/6472435/running-exe-in-firefox-why- do-i-get-an-error
    However, you will still have problems with getting it to work cross-browser. Honestly, browsers are not supposed to have access like that to the client side file system, which absolutely makes sense for the web.
    That is why you may have to approach the solution from a different angle - perhaps create a server side cloud version of your application(s) which can be easily accessed and run by your family members. I believe you used C to develop the applications? Although I have no experience with this framework, Wt might be a solution to convert your projects to server side applications:
    http://www.webtoolkit.eu/wt
    Good luck!
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5972893#5972893
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5972893#5972893
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5972893#5972893. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Dreamweaver support forum at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

Maybe you are looking for

  • Numbers mixed up on our 2 iPhone 5's -  HELP!!!!!!!

    My husband ordered 2 iphone5's (white for me & black for him). Somehow, my phone # (an upgrade line) was assigned to the black phone and his phone # (also an upgrade) was assigned to the white phone. We are not trying to move the iPhone 5 to a non-up

  • Trying to reinstall Photoshop CS6 on a new computer

    help! Trying to reinstall CS6 on a new computer but getting an error message that states the serial number is invalid. What do I do?

  • Naming a file in File(Sender) communication channnel

    Hi , I am working on File to Idoc scenario. I need to define the file name in the communication channnel. The input files would be in incremental format as below, DRX.XYZ.B46.LOCLPUR.R006.DATA         DRX.XYZ.B46.LOCLPUR.R006.DATA.G0226V00 DRX.XYZ.B4

  • Syncing iCal without using Mobileme

    This is probably a basic question but I'd appreciate help please. My wife and I each have a MBP which are synced for contacts, bookmarks and calendars.  I have a Mobileme account in my name and my wife has an iPhone. We now want to sync just the cale

  • Iphone will not backup, when trying to install latest software

    For some reason, it appears, that the phone will not backup, while trying to install latest software. PC, is running windows 7. Anyone out there have the same problem ?