JOptionPane fired by FocusListener requires two clicks to close

I have a similar problem as the person posting this ( http://forums.java.sun.com/thread.jsp?forum=54&thread=109797 ): my JOptionPane fired by a focus listener needs to have its OK button clicked twice before the dialog closes. Any ideas?

check out this thread
http://forum.java.sun.com/thread.jsp?forum=54&thread=109797

Similar Messages

  • Dropdown widget requires two clicks?

    I'm just becoming familiar with the dropdown widget, and have noticed that it requires two clicks in order to display the list. The first click doesn't do anything, and the second displays the choices. Is there some way around this? I looked in the properties but didn't see anything related to this issue. Any help is appreciated. Thanks!

    I reported this behaviour, don't have a workaround. Can only recommend that you report it as well.

  • Two clicks to close tab in Firefox 28.0

    just upgraded to Firefox 28.0. now it takes two clicks, rather than just one, to close a tab.
    it's not a new feature, it's a bug.

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings and disables most add-ons (extensions and themes).
    ''(If you're using an added theme, switch to the Default theme.)''
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu by clicking on the '''Restart with Add-ons Disabled...''' menu item:<br>
    [[Image:FirefoxSafeMode|width=520]]<br><br>
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''

  • JTable DND requires two clicks (fixed but broken in 1.6)

    I'm using a JTable as a source of a drag and drop operation.
    I can easily get it to work, however, when I want to start a drag from an unselected row I have to first click on the row to select it and then mouse-down on the row and then I can drag it.
    I found a workaround and it was working flawlessly. I was caching the mouse-down and technically firing it twice. Although it seemed like a really cheap trick it worked, but now in 1.6 it doesn't.
    Any ideas?

    Alright, here's the code. I've tried a bunch of things, but if you can get a single-click drag working on this example, then it'll work in my stuff as well.
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class JTableDNDExample extends JTable
      // the data for the table...
      private String[][] data =
          { "Cell 1-1", "Cell 2-1", "Cell 3-1" },
          { "Cell 1-2", "Cell 2-2", "Cell 3-2" },
          { "Cell 1-3", "Cell 2-3", "Cell 3-3" },
          { "Cell 1-4", "Cell 2-4", "Cell 3-4" },
          { "Cell 1-5", "Cell 2-5", "Cell 3-5" },
      // the columns for the table...
      private String[] columns = { "Column 1", "Column 2", "Column 3" };
      public JTableDNDExample()
        // enable the drag...
        this.setDragEnabled(true);
        // create the table model with the default data...
        DefaultTableModel model = new DefaultTableModel(data, columns);
        this.setModel(model);
        // get the selection model...
        ListSelectionModel selectionModel = this.getSelectionModel();
        selectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        // set the selection possibilities...
        this.setCellSelectionEnabled(false);
        this.setRowSelectionAllowed(true);
        this.setColumnSelectionAllowed(false);
        // create the trasnfer handler for the table...
        TransferHandler th = new TransferHandler()
          public int getSourceActions(JComponent comp)
            // return the copy or move action...
            return DnDConstants.ACTION_COPY_OR_MOVE;
          protected Transferable createTransferable(JComponent comp)
               int index = getSelectedRow();
               if(index >= 0 && index < data.length)
                 // get the value at the index...
                 String value = data[index][0];
                 // get the string transferable for the string...
                 StringSelection transferable = new StringSelection(value);
                 // return the rtansferable...
              return transferable;
            // no element to transfer, return null...
            return null;
          public boolean canImport(JComponent comp, DataFlavor[] flavors)
            // cannot import, return false...
            return false;
        // se tthe transfer handler...
        this.setTransferHandler(th);
      public static void main(String[] args)
        JFrame frame = new JFrame("JTable DND Example");
        frame.getContentPane().setLayout(new GridBagLayout());
        JTableDNDExample table = new JTableDNDExample();
        JScrollPane scrollPane = new JScrollPane(table);
        frame.add(scrollPane, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0,
          GridBagConstraints.CENTER, GridBagConstraints.BOTH,
          new Insets(6, 6, 6, 6), 0, 0));
        frame.setSize(500, 500);
        frame.setVisible(true);
    }

  • Why does the Back button require two mouse clicks?

    I've just upgraded to ver. 9 and now the Back button requires two mous clicks/

    I might not have used the word "Normal".  "Typical" maybe.  I suppose "Normal" is acceptable in the context of "SNAFU".
    Wait until you make an edit on one of your own posts to fix a stupid typo, then later look to find the typo back and you can no longer edit it.  And what's up with that messed-up Javascript that shows up at the top of some quoted messages?
    These forums are barely usable, but a bright spot is the color-managed photo attachment capability (i.e., you can upload an image with a non-sRGB color profile and the server will convert it).  I suppose if anything Adobe could have been expected to get that part right.
    -Noel

  • Two clicks required for Safari window which is not currently the focus

    This is really starting to annoy me - I have a 17" powerbook so I can display two webpages side by side. I click on a link in one page and... ...nothing happens. If this page was not the current focus, my first click just changes the focus - i then have to click again to go to the link. Many times i sit there waiting for the display to update, only to find that it is not going to because it requires another click... Is there any way to make Safari take action on the first click on a window not currently in focus?

    I don't know of any way to allow this.
    Mail works the same way.
    using mail & safari windows side by side does the same, as does anything(?) that involves switching applications.
    It's just the links in safari that require one click to focus then one to activate - running two safari windows & clicking something in the toolbar or bookmarks bar on the 'other' window works just fine. As does clicking a 'button' within the page (like 'post message' on these boards,for example)
    I can only suggest letting Apple know what you think at http://www.apple.com/macosx/feedback/

  • Two clicks required to get results from Search Input box on toolbar.

    I'm running version 8.02.208.
    I'm new at Webhelp and was hoping somebody might be able to give me some pointers.
    If I open my published webhelp on the Internet and try to search using the Search Input box on the toolbar the first time, two clicks are required in order to get search results.
    This problem only appears the first time, all other searches from the Search Input box on the toolbar work properly with only one click required.
    In addition, the Search tool opened from the Search button always works fine first and every time, but I did see the extra space that I've read about.
    This is what I don't understand...the problem I mentioned with the 2 clicks required on the toolbar, never happens when I Generate and View the results. Meaning that I am looking at the output but have not published it yet. It works fine first and every time.
    Why would the problem show up one way and not the other? Does anyone know what could be different?
    I just keep hoping that there is something that I can do to get rid of the problem. I keep getting Problem Reports opened and assigned to me and complaints from customer service from customers. They think the search isn't working and I keep having to explain.....arghhhh!
    Thanks!
    Deb

    Hi Sheryl and Peter,
    I have also tried the options as you have suggested without success. Everything works fine when the WebHelp is published to a local or network drive but when it is published to the server the issue occurs.
    I would point out too, that I find that the problem with the space only occurs on the intial attempt to search using the Search Box. Any subsequent attempts without closing the browser appear to work fine.
    Chris

  • T60P CD-rom requires two open/close to recognize a CD

    Every time I place a CD in my T60p it spins and sounds like it finds the CD but then when i click the CD-ROM in WinXP it tells me to insert a disc.  All I have to do is open and close the CD-ROM and it finds the CD.  This happens with every single CD I have ever used, DVD included.  It requires two times to recognize.  I have had a replacement CD-rom drive but it did not fix the issue.
    Regards,
    Xerical

    Anyone?

  • My apps require two taps to open. How can i open them with one tap

    My apps require two taps to open on my Ipad.  How can I set them to open with just a single tap?  Originally it took just one tap.

    Turn off VoiceOver
    1. Press the Home button
    2. Tap Settings.
    3. Then double-tap Settings.
    4. Tap General.
    5. Then double-tap General.
    6. Use three fingers on the screen to scroll to Accessibility
    7. Tap Accessibility.
    8. Then double-tap Accessibility
    9. Tap VoiceOver
    10. Then double-tap VoiceOver.
    11. Tap "On" next to VoiceOver
    12. Then double-tap "On" to turn it off.

  • HT201406 The Home button on my iPod Touch is very unresopnsive.  It takes several tries to activate it.  While doing so, it responds to one click vs the intended two clicks and vice versa.  It is a very frustrating process.  Any suggestions?  I tried the

    The Home button on my iPod Touch is very unresponsive.  It takes several tries to activate it.  While doing so, it responds to one click versus the intended two clicks and vice versa.  It is a very frustrating process.  Any suggestions?  I already tried the "shut off" process that was suggested on the Apple site, but that did not help.

    Try:
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • Loosing everything on a RAID, is it possible in two clicks?

    Okay, I TOTALLY screwed up! I hope, beyond hope, someone on here has some magical solution to a total lapse of good judgement on my part. Man, I did the stupidest thing I could manage, I think.
    I thought I'd run an erase of my free space on my boot drive, for whatever reason. I have a boot drive, and then four drives connected in a basic striped Raid set (four slices) as my media drive.
    I after while I decided to stop the erase operation, as it was taking a long time and the temp file was not letting me carry on with my normal work as it had of course filled my boot drive by this time. I selected cancel (or whatever it says) to stop it, and got the little spinning beach ball. Several minutes later, the ball was still spinning, and so out of impatience I decided to 'Force Quit" the Disk Utility. I think I've tried to do this erase function before and got just as impatient and either force quit it, or the same result occurred maybe my normally let it shut down early.
    What happened was it didn't get rid of the temp file and it still showed I had zero space on my boot drive. Having something similar happen, in some fashion, before, I was trying to think how I could now get rid of this temp file. I tried searching for it, but couldn't really find it or know where to look. So I was thinking I'd try to start the erase function again in case it recognized the old temp file as I started the operated and hopefully would delete it.
    Here is where I screwed up, totally. Because my drive names are somewhat similar, and because I was a little mentally tired at the time, I inadvertently selected one of my raid slices instead of my boot drive. And in two clicks erased it. I didn't erase the free space, I erased the drive. Or I guess I just reset the table information at the beginning of the drive (I'm hoping this may give me some sort of way out of this mess).
    So, in summery, I have three of the four RAID slice images like they were, and the (virtual) raid image is still there (not mountable now), but I have one slice that I erased, or reset as a normal Mac Extended Journaled drive/image.
    My problem is that I am a pro photographer (and do some video work) and I had a bunch of things I haven't backed up yet on the media drive and can't replace. I was actually planning on backing them up soon, but what help is planning at this point. I can't tell you how dumb I feel, or i guess numb is a better word.
    I noticed a recover file in the trash called "EFTFile1.sparseimage" I'm not sure if that is related, or related to the process of the first erasing process. It is 201.74 GB used. My RAID is made up of 4 X 279.3 drives which was about 1 TB. It was nearly full, so you can imagine how much stuff I had on there. I wanted to back it up, but since I don't have a drive of that size elsewhere I was going to have to be selective about that, which is why I hadn't done it yet. I was trying to pare it down first. My boot drive is 465 GB, and still reads zero space available.
    What do you all suggest? Did I just loose tons, and tons of work, some of which I can't recreate again in two clicks? Should I start drinking?
    Any help would be VERY APPRECIATED.
    Thanks, Craig

    Ok, I understand you. Using the show and hide method to dispatch events on the [Component 2], but how can I "reset" for example a comcoBox dataprovider already loaded with data?
    Puting on another way:
    I have a [products_grid_component] and a [product_details_component]...to go from de grid to the details I wanna use an effect like I explain on my 1st post. I have a comboBox located in the [product_details_compoent] with several options fot that product_id  that i'm showing the details.
    What happen is, for example, the comboBox's dataprovider is loaded with [Value1][Value2][Value3] and [Value 4] for the product_id=22 (example), when i call the [products_details_component] for the 1st time, I open the comboBox and all the data is displayed correctely with 4 options ([Value1][Value2][Value3] and [Value 4]). Then i go back to [products_grig_component] (both components slides right showing the [products_grid_component] and hidding the [product_details_component]) when i go to [product_details_component] to view the product_id=30, the comboBox behaves like this: imaging that the dataprovides contains [Value 15][Value 16][Value 17][Value 18] and [value 19]...now is the funny part...the comboBox index 0 is [Value 15] but when i open it i can see a space for 4 optnios, a scroolBar and it is still loaded with [Value1][Value2][Value3] and [Value 4] but if i select [Value2] what is going to be displayed is [Value16] and i after i had selected an option, the comboBox shows the optnios correctly..It looks like the comboBox dataprovider is not refreshed.
    I already tryed to refresh() the dataprovider, empty the dataPRovider and loaded again with data, etc....but is def something i'm not doing right.
    How can i turn around this??

  • Wireless mwirelessouse requires multiple clicks to open or maneuver around my iMAC. Tried new Magic Mouse still the same!

    wireless mouse requires multiple clicks to open or maneuver around my iMAC. Tried new Magic Mouse still the same!

    wireless mouse requires multiple clicks to open or maneuver around my iMAC. Tried new Magic Mouse still the same!

  • Two click boxes counted as one interaction

    When I have a screen with two click boxes that are ticked to include in quiz, I only want one or the other clicked, not both. It seems that Captivate wants you to click both in order to for it to recognise that all questions have been answered. How do I get around this?

    If this is one of those situations where the user needs to choose one of two correct answers, and clicking either click box would be considered a correct answer, then one way to deal with this is to use the Infosemantics Interactive Master Widget:
    http://www.infosemantics.com.au/adobe-captivate-widgets/interactive-master
    You turn off reporting for both of the click boxes and get them set up as slaves of the Interactive Master Widget, which then reports a single score to the quiz regardless of which click box is clicked.
    Trial version available here if you want to try it out:
    http://www.infosemantics.com.au/adobe-captivate-widgets/download-free-trial-widgets
    Just one caveat:  This is an SWF widget so it is not compatible with HTML5 output.

  • Can we perform two actions with one button with two clicks one after other?

    Sir,
    can we perform two actions with one button with two clicks one after other?
    I want that when I click an Add Button first time it add data to the database and when I click again this button it clear the form data to empty fields.
    Regards
    Tanvir

    In code it should be easy.
    The following code adds a button called butman with a text "ADD".
    It then registers a listener that will be called if the button is clicked.
    This listener then calls the runAddData method if you clicked on butman while it contained the "ADD" text and it will call the runClearData method otherwise.
    Therefore it will swap the button's functionality between ADD and CLEAR on every click.
    final Button butman = new Button("ADD");
    butman.setOnAction(new EventHandler<ActionEvent>() {
              @Override
              public void handle(ActionEvent t) {
                        if (butman.getText().equals("ADD")) {
                                  butman.setText("CLEAR");
                                  runAddData();
                        } else {
                                  butman.setText("ADD");
                                  runClearData();
                        } // END IF-THEN
              }});I hope this is what you wanted.
    Some extra food for thought.
    You might want to run the ADD and CLEAR methods in their own threads so that it can run in the back ground, without slowing down your user interface.
    I also like to rather reuse one button for multiple functionality in stead of making an application with hundreds of nodes only used rarely with masses of code to show and hide them if needed.

  • I just got my MIDI to USB cable, fired up Garageband.  I clicked the basic lessons, tried Play.  But the lesson guy is playing.  I'm the one who needs the practice.

    I just got my MIDI to USB cable, fired up Garageband.  I clicked the basic lessons, tried Play.  But the lesson guy is playing.  I'm the one who needs the practice, not him.  Please help.  I don't know what I'm doing.

    G35Guy:
    Well, if that's the case, you must have a different finish on yours than I have on mine. Either that or you are extrordinarily careful when using it. Mine literally scratches when using a microfibre cloth. I would really like to know whether yours is somehow different. It would really piss me of if some people got a good quality exterior that doesn't scratch and some of us got the opposite. Did you try holding your player under a light to see if there is anything. You may just be looking at it in bad lighting. I find it hard to believe, unless your unit has a different type of plastic cover, that it hasn't received any type of scratches. Can you take a picture of it's It probably seems as though I don't believe you. That's not the case. Its just that I was so careful not to scratch it last night and it got scratched anyway. I have read of similar experiences by others who have the Vision:M as well.
    I wish I could return mine and get a different color, it really upsets me that a $300 item that is meant to be hand held and used heavily scratches this easily!! If anyone from creative is reading this, I would like to know what you plan to do about it! I didn't pay all of that money to have this player look like Sh*t when I am only using it the way it was intended and am being very careful at that!
    John

Maybe you are looking for