Focus lost when a popup menu is activated...

It seems that when a popup menu is activated the component invoker lost focus. this is ugly because a focus lost can trigger unexpected events (formatting, validating, etc). how can I avoid this?
thanx

I must seem a bit weird being the only one to reply to my posts, but I found what is occuring, is that when I do the mouse click the InputVerifier for that JTextField is firing. This is causing a problem, because this input verifier pops up a dialog saying please enter correct values ... and then highlights the entire text field. Problem is if the input is currently invalid I can't use the mouse.
Any ideas?
Tom

Similar Messages

  • Focus lost when pressing ALT key

    Hi,
    is there any way to prevent the focus to be lost when pressing ALT key in an AIR app??
    I tried event.preventDefault() in KEY_UP and KEY_DOWN events but it doesn't work
    when the user press the ALT key, the stage loses the focus
    thanks

    I am now having trouble with the same issue. I have tried removing the ALT key from the Input Map from my frame and the component I'm having trouble with. I have also tried setting my own action in the action map for this. We also tried listening for the key pressed event and putting focus back to the combobox where I want focus to remain. I am now working on trying to use the processKeyEvent method to handle this, but have not had any luck as of yet with that. If anyone has some help on this, I'd greatly appreciate it!

  • Focus Lost when Dragging JInternalFrame?

    Hopefully this should be a simple question:
    I have a JInternalFrame with numerous simple components like JTextFields.
    When I click the title bar, or click and drag the Frame, the JTextField that had focus prior to that clicking loses focus. Focus goes to the Main Frame window, and if I use setFocusable(false) on the main frame, focus goes nowhere (getFocusOwner() == null).
    I want focus to remain in the same component (the JTextField) when clicking on the title bar and when dragging. How do I do this?
    I'm using jdk1.4.1_01. Thanks for the help!
    Joel

    I HAVE AN ANSWER!!!
    First of all, when you click on the JInternalFrame's title bar, I was losing focus. To fix this, I added a mouse listener to the title bar. I then reset my focus on a mouse clicked event. To find the title bar, I did the following:
    private BasicInternalFrameTitlePane findTitleBar()
        Component[] comps = this.getComponents();
        for (int i = 0; i < comps.length; i++)
             if (comps[i] instanceof BasicInternalFrameTitlePane)
                  return (BasicInternalFrameTitlePane)comps;
    return null;
    If the findTitleBar method doesn't return a null, add a mouse listener to it. In the mouseClicked method, reset your focus. I found by using the SwingUtilities.invokeLater, it worked better. So my mouseClicked method looked like:
    public void mouseClicked(MouseEvent  e)
       initFocusFor(getFocusComponent());
    public void initFocusFor(final JComponent comp )
       if (comp == null)
          return;
       SwingUtilities.invokeLater(new Runnable()
         public void run()
            comp.setRequestFocusEnabled( true );
            comp.requestFocusInWindow();
    }Now, for the resizing and dragging.... I was losing my focus on that as well. I believe my desktop manager was getting the focus on resizing and dragging. So, on my subclassed desktop manager, I just added logic to reset my focus on the JInternalFrame on the following methods: endDraggingFrame and endResizingFrame.
    Hope this helps someone else.     

  • [1.1.0.22.71 - Linux] Focus lost when prompting for password

    Hi,
    I used to have the same problem on 1.0 from time to time, but with 1.1 it happens every time.
    The problem: When I try to open a connection whose password has NOT been saved, I get two windows: one "progress bar" titled "Connecting to ...", and another dialog titled "Connection Information" prompting me to enter the password. However, the cursor is nowhere to be seen; the keyboard doesn't work at all (neither Enter nor ESC close the dialog); clicking on the edit boxes or blind typing has no effect. Clicking OK then inevitably results in a message saying "A password is required" so the only way out is by clicking "Cancel".
    The only workaround I've found so far was pasting the password using the mouse (middle button).
    There are no exceptions on the console.
    SQL Developer is running on RH Linux:
    os.version     2.4.21-9.ELsmp
    I'm working on an HP/UX workstation and using an X session to the Linux server.
    I've never experienced this problem on the WindowsXP laptop.
    Looking forward to your help,
    Flado

    Marcus,
    is this a standard numeric data, or is this 5502.73 in local form with the"," instead of the "."
    B
    I want to try and get this today as there was another post on exporting in territories other than AMERICA

  • Popup menue problem

    when adding popup menues on text pane component then try to appeare it ,the textpane component appeare in front of the popup menue
    i want fix this problem!!!!!

    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html#popup]How to Use Menus for a working example of using popup menus.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • WiFi IP address lost when activating internet sharing

    iMac (24-inch, Early 2009)
    I'm having troubles with sharing my wifi to internet.
    Worked great untill today. Wifi IP address (reserved/dedicated address from DHCP Airport Extreme 192.168.0.4) disappeares when the Internet Sharing is activated. Wifi in Network turnes orange and notes that no IP address is available.
    When the Internet Sharing is turned off, the DHCP connection seemes to restore and the normal IP address returns.
    Both IPv4 and IPv6 are active and available on the network. IPv6 address lost also.
    Did a complete rework of the Airport Extreme, complete rework of the iMac network environment, dumped all settings (trashed the config folder) rebooted modem, router, iMac in different order. Repeated everything with firewall off, tried again without encryption, no results.
    Everything works great, except for the Internet share (over ethernet for devices using wifi).
    DHCP / IP lost the moment the sharing is activated and restored the moment it is killed.
    Anyone got any suggestion?

    "Stuffed up" is not really a term we use much in networking. What did you actually do? Using what software? How are you connected to your local network, and how is that connected to the internet?
    What happens if you use the Apple menu to access System Preferences/Network?

  • Make a menu tab active when using templates

    Could anyone tell me how de we achieve making a menu tab active when using a template and a combination of html & php. I am putting the code I am using for my menu and do not see how to do this and how to relate inner pages to the right menu tab ... The site has hundreds of pages so i hope there is an easy way to do this without having to create duplicated templates. Many thanks.
          <li><span class="divider divider-vert" ></span></li>
          <li><a href="Hostels.html">Hostels Brasil</a></li>
          <li><a href="Historico.html">Historico e Filosofia</a></li>
          <li><span class="divider divider-vert" ></span></li>
          <li><a class="item-primary" href="Brasil-Carteira.html">Carteira HI Brasil</a>
             </li>
          <li><span class="divider divider-vert" ></span></li>
           <li><span class="divider divider-vert" ></span></li>
          <li><a class="item-primary" href="hostels-mondo/index.html">Hostels do Mundo</a>
    </li><li><a class="item-primary" href="Contato.html">Contato</a>
            </li></ul>

    Humm .. really not sure what I'm doing wrong here .... I've been redesigning the whole menu but cannot get that to work , if you dont mind I am sending you the code here first so you can already have a look and see if there is some obvious mistake , I am still testing all this on my local machineand as I completly re made the menu for the purpose I cannot upload the files and let the client see a menu like this  (now I was also wondering if maybe this would only work on a live server ?)
    So my menu is like this
    <div id="nav-container"><div id="nav">
        <ul>
          <li><a href="../index.html">Home</a></li>
          <li><a href="../viagem-brasil/destinos.html">Destinos</a></li>
          <li><a href="#">menu</a></li>
        </ul>
      </div>
    </div>
    Then just befor the </body> tag I have the following :
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryDOMUtils .js"></script>
    <script>
           function InitPage(){
            Spry.$$('nav li').forEach(function(node){
            var a=node.getElementsByTagName("a")[0]; // finds all a elements inside the li, but we only want the first so [0]
            if(a.href == window.location){
                Spry.Utils.addClassName(node,"activeMenuItem");
        Spry.Utils.addLoadListener(InitPage);
        </script>
    And my css is, you will notice I am trying to get an image as background but this is only a detail .....
    #nav{
        margin: auto;
        color: #FFF;
        height: 65px;
        width: 1060px;
        text-align: left;
        background-image: url(../images/menubg.gif);
    #nav-container
        height:65px;
        background-image:url(../images/menubg.gif);
        width: 100%;
    #nav-container ul {
    padding:0;
    margin:0;
    list-style-type:none;
    #nav-container li {
        margin-left:2px;
        float:left;
        height: 55px;
        /* [disabled]padding-top: 25px; */
    #nav-container ul li a {
        display:block;
        float:left;
        width:100px;
        /* [disabled]background-color:#6495ED; */
        color:#FFF;
        text-decoration:none;
        text-align:center;
        padding:5px;
        /* [disabled]margin-top: 20px; */
        height: 25px;
        padding-top: 30px;
    #nav-container ul li a:hover {
        background-image: url(../images/menuHome.png);
        display:block;
        float:left;
        width:100px;
        /* [disabled]background-color:#6495ED; */
        color:#FFF;
        text-decoration:none;
        text-align:center;
        padding:5px;
        /* [disabled]margin-top: 20px; */
        height: 25px;
        padding-top: 30px;
    .activeMenuItem a {
            background:#a59a84;
            color:#000;
    .activeMenuItem a {
        background:#a59a84;
        color:#ffffff;
        background-image: url(../images/menuHome.png);
    I really thank you for your time and hope you'll spot the mistake, if not I will do upload something so we can see it live !
    Many thanks

  • Encore CS4 crashes when export to image bluray disc (using popup menu)

    Hi...
    When a export the bluray project to image bluray disc, its works fine.
    But, when i use popup menu, the exports crashs!!
    Please, help me.
    regards,
    Andre

    Jeff, thx for reply.
    Yes, i create the popup menu in PS using template popup HD as model.
    Import in encore project , link the buttons (buttons "red" not appear) and no errors.
    Export and ... bummm! crashes!
    I remove the popup menu and export normally.
    Any software adobe apps is open while i export.
    Andre

  • How do I disable the brushes popup menu when I left click in Photoshop CS5?

    How do I disable the brushes popup menu when I left click in Photoshop CS5? I am trying to use the clone stamp and I am not able to get a sample because of this popup menu.

    LOL,  I can't even begin to complain with the number if times I misread questions, and then try to break my own record for the number of typos in a single post.
    The image above was taken on a photgraphic weekend where the group (of all young ladies ) I was travelling with, set us a photography challenge.  The one above was my response to a 'faceless portrait'.  The only other one I attempted was this response for a picture of a 'wild animal', featuring camera club president Liz.
    Oh what fun we had, laughing and laughing until our faces fell off.
    [EDIT]  Both taken at Karamea, which some visitors to NZ might recognise as the western end of the Heaphy Track.

  • JTable discards input when focus lost

    Hi! Im running Java 1.4.2-b28.
    Problem as follows:
    I have a JTable where the user can enter som data.
    I also have a button with the caption "Minimize" that starts processing of the same data.
    If i enter a value into the table (say "foo") and press "Minimize" when the cell is in editing mode, "foo" is NOT SAVED into the JTable's TableModel! getValueAt(int row, int col) returns an old value instead!
    How can i change the focus lost behaviour on the cell? Is this a bug??
    Regards
    /Alex

    Found an answer to this, sorry everyone. Well, here it is:
    http://forums.java.sun.com/thread.jsp?thread=350530&forum=57&message=1453945

  • Help!  A "Connect to" popup menu appears when trying to play a video...

    Thanks.
    A "Connect to" popup menu appears that asks for my username
    and password when trying to play video.
    I believe this menu began appearing after installing IE 7.0.
    Is it therefore a IE 7 issue, or IIS authentication setting, or do
    I need to reinstall flash or shockwave? Another question, and very
    basic... how do I know if i am using flash or shockwave?
    I have googled this and cannot find a similiar case.
    Ideas? Thanks.

    Well, the answer is going to depend on your network setup. If
    you're a home user on a single machine then I'd check your firewall
    settings. Or contact your ISP to see if they've implemented any
    kind of proxy that requires authentication.
    If you're in a network environment then hit your IT guys to
    see if they're blocking the FLV file format, or blocking RTMP
    streams, or requiring proxy authentication or something like
    that.

  • Adjustment popup menu desappears when holding alt + click - cc2014

    Hello.. Is anyone else experiencing problems when creating adjustment layers in cc2014? if you hold the alt key while choosing adjustment layers, then the popup menu starts flahsing and disappears?!

    Seems to be a new bug. I see the same. You should report the problem to Adobe Photoshop Family Customer Community

  • How to listen mouse event when drag on popup menu

    hi, all
    Please explain: When the Frame show, click mouse (left/right) on title bar of Frame, the popup menu will be show
    I Expected :
    When drag mouse on this popup menu will System.out.print("Mouse dragging on popup...");
    Thanks many,

    I know this popup is managed by window
    How to I can get mouse action on it ?

  • How i create popup menu when button onclick

    how i create popup menu when button onclick

    You try adding a scrip tag in your jsp code, and calling the function in the onclick attribute.
    Example:
    <script><![CDATA[
                    function confirmDelete(){
                    if(confirm("Are you sure you want to delete selected user")){
                    return true;
                    } else{
    return false;
    ]]></script>
    <ui:button action="#{View.delete_action}" binding="#{View.delete}" id="delete" onclick="confirmDelete"/>
    Cheers
    Daniel
    null

  • How to disable the run-time popup menu in the sequence display on TestStand Operator Interface, that allow the use to skip the test?

    How to disable the run-time popup menu in the sequence display on TestStand Operator Interface, that allow the use to skip the test?

    Hello,
                  Regarding the skip/force pass/force fail options, when I set the ControlExecFlow to True in Teststand 3.1 and 3.5, in the Sequence Editor the menu options for skip/force pass/force fail are not active for Technician but, when I launch the Operator Interface logged with Technician the options are active. The problem is that if the technician sets one step to one of these options, and change the user to Operator, the test step remains skip/force pass.
                  Is there any possibility without modifying the Operator Interface (at programming level), to reload default values of the steps when changing the user to Operator?
    Thank you,
    Best regards,
    paio

Maybe you are looking for