Double-click problem on JList items

I wrote codes in double-click function on JList selected items and used the codes below (the same as those in the Java1.3 document).But I find sometimes the code can't catch the mouseClicked event and do nothing at all. Is there any other trick to implement the function properly? Thanks a lot!
final JList list = new JList(dataModel);
MouseListener mouseListener = new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
int index = list.locationToIndex(e.getPoint());
System.out.println("Double clicked on Item " + index);
list.addMouseListener(mouseListener);

Hi Amjad,
instead of adding the doubleclick-event on every list item, you can just check which item was clicked in the dobuleclick-event of the list-box.
In the mentioned example, you can replace the ondblclick listener with the following:
oSimpleListBox.ondblclick = function(e){
   alert(e.target.innerHTML)
This will output the text of the clicked list item
Greets,
ben

Similar Messages

  • Impossible to double-click on a todo item when another's title is highlighted

    Can anyone reproduce this?
    1) Double-click on a todo item. Its title gets automatically highlighted.
    2) Double-click on another todo item
    Expected Results:
    After 2), the info bubble for the second todo item is displayed.
    Actual Results:
    After 2), a new info bubble pops up, but it is still for the same initial todo item.

    If that is a main video for your project (rather than just for a motion menu), yes. If you import as asset, and you want a timeline, then you have to create a timeline for it.
    See help:
    Encore Help | Create and manage timelines

  • Open Dialog double-clicking problems.

    Here's a head-scratcher...
    Recently in almost any Open Dialog box, when I double-click a folder on my server it will turn the arrow down and list the contents rather than opening that directory. Then when I save, it doesn't save it in the intended directory. Strange. I can't seem to figure out why.
    The real strange part is that it happens in all my non-Apple applications only (e.g. illustrator, bbedit, Word), but Apple apps behave normally (e.g. Preview, Safari). Also, it ONLY occurs when I try to access folders on my server (Linux using Clark Connect) where my HD and external HD behave perfectly fine.
    The other strange thing is I've tried this on another mac on the network and my PowerBook, but, surprise, it all works fine on those machines -- so it's just my G5. I tried trashing finder pref but no joy.
    I can work around this by doing a lot of command-downarrow's in those dialog boxes, but I'd prefer to have it the way it was
    Can anyone shed some light on this strange phenomenon? I can't find any threads anywhere that has this same problem. Thanks in advance.
    G5 Tower Dual 2.5   Mac OS X (10.4.8)  

    Huh.
    I've recently started having the same mysterious annoyance. Except the afflicted folders are on an external (firewire) drive, not a server...
    Similarly, it's not occurring with Apple apps, as far as I know.
    What's perhaps oddest of all, some folders on this volume are functioning normally, while others aren't.
    I had been using Default Folder X, but this happens even when that's disabled, erased, freshly installed, etc. In certain apps, clicking on the current folder name in the open/save dialog initiates a crash (seems related to the interface itself).
    I've repaired the disk, permissions, trashed all related preferences, etc. Everything checked out okay.
    One final clue, perhaps related or not: I've been finding duplicated folder names nested in the 'Volumes' path subordinate to my primary disk. These are probably supposed to be hidden. But I haven't deleted or otherwise tinkered with them. They do not contain the identical items of the 'real' volume (much fewer folders, documents, etc.) but there they are, acting somewhat like imposters.
    Like ookla says, a head-scratcher. I'm gonna upgrade to latest flava of OS and see if it helps; I'll let y'all know.
    Good luck!
    G4 Powerbook, G4 Tower   Mac OS X (10.4.3)  

  • AVL Double click Problem

    Dear Experts,
    I hv created an ALV report. when in double click on the record it take me to the required tcode (FB03).
    But the problem is ,it always display last record of internal table if I clicked on first record,
    Can any one suggest me something.
    Regards,
    Maverick

    Thanks for ur reply.
    I m using normal ALV. go through the following
    form display_all_item_alv.
    w_repid = sy-repid.
    perform update_catalog.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = w_repid
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
    *   I_CALLBACK_TOP_OF_PAGE            = 'TOP-OF-PAGE'
       IT_FIELDCAT                       = I_FCAT[]
       I_SAVE                             = 'X'
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = i_faglflexa_all
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    form user_command using r_ucomm like sy-ucomm
                      rs_selfield TYPE slis_selfield.
      w_gjahr = p_gjahr.
      case r_ucomm.
         when '&IC1'.
            if r_open = 'X'.
              set parameter id 'BLN' field i_faglflexa_open-belnr.
            elseif r_clear = 'X'.
              set parameter id 'BLN' field i_faglflexa_clear-belnr.
            else.
              set parameter id 'BLN' field i_faglflexa_clear-belnr.
            endif.
          set parameter id 'BUK' field p_bukrs.
          set parameter id 'GJR' field w_gjahr.   "i_faglflexa_clear-gjahr.
          call transaction 'FB03' and skip first screen.
      endcase.
    endform.                    "user_command
    Regards,
    Maverick

  • ITunes double click problem (query bug)

    With the recent iTunes update 7.7.1(11), I noticed that when switching between iTunes (esp. when it is in the compact mode) and other apps, a single mouse click in iTunes is often interpreted as a double click. This leads to distress when I try to pause the current track as the double click action pauses the track then plays it.
    To relieve this symptom, I need to minimize iTunes and maximize it again.
    Anyone else out there with the same problem?
    (sorry about the double post - first time @ the discussion pages)

    i'm having this same problem, but the "auto" double-clicking happens in mac mail. i've checked mouse settings, i've rebooted, but nothing seems to help. whenever i switch into mail, my first click is always treated as a double-click. (very annoying, since it usually opens a message into an unwanted window.)
    another mouse-related problem: sometimes my mac seems to be swallowing mouse clicks. (not in mail, though! maybe that's where all those lost clicks are going! <g>) my mac acts as if i am clicking on a dead zone (that is, a region that doesn't accept clicks). i can click on the region all day (e.g. a tab in safari) and nothing will happen. if i, however, click on something else (even, say, just the background of a web page), the go back to the area that was dead moments before (that tab, e.g.), suddenly it accepts the click.
    any ideas?

  • Double Click to Activate Tree Item Editor

    Hi, I have an mx:Tree that uses an MXML component as an item
    editor. I only want to activate the editor when the user double
    clicks on a tree's node. As a default, a single click will open the
    the item editor on the Tree list. Can anyone help me with
    this?

    I am pretty sure it is possible, but I have not done it. You
    will probably need to cancel the default behavior of click event.
    Tracy

  • Flash wmode=transparent double-click problem in IE

    Hi,
    I've discovered a strange problem with flash content using
    wmode=transparent in IE - when someone double click the flash the
    whole movie TURNS BLUE (!)
    For example you can see this behaviour in action at
    http://www.stella-artois.cz
    - I implemented there IE active content fix (as described at
    http://www.macromedia.com/go/7c29e252)
    and ended up with this.
    Well, as far as I can say there are people who double-click
    on everything, so I'd really like to fix it.
    Would anybody know how to do that?
    Thanks a lot!

    Sometimes it is just a trial and error.  The main thing is since I'm not working with your files, I have to mimic your scenario as best I can.  Make sure you give it exact positions when stacking actual videos or swf files to force them to overlap.  I tested this first with just a swf file and now the example is swapped to stack to youtube embeds as examples.
    It really shouldn't matter if it is a dropdown or what type of activity, as long as you have the stacking correct.  You can also, generally set the one in back to opaque. I updated the code snippet because this one seemed to read better.
    <html>
    <head>
    </head>
    <body>
              <div id="background" style="position:absolute; left:0px; top:0px; z-index:-50">
              <iframe title="YouTube video player" frameborder="0" allowfullscreen="true" allowtransparency="true" width="650px" height="750px" src="http://www.youtube.com/embed/FOHJUrcVdJk?amp;wmode=transparent"></iframe>
              </div>
              <div id="myDiv" style="position:absolute; left:0px; top:0px; z-index:1000;">
              <iframe title="YouTube video player" frameborder="0" allowfullscreen="true" allowtransparency="true" width="500px" height="500px" src="http://www.youtube.com/embed/FOHJUrcVdJk?amp;wmode=transparent"></iframe>
    </div>
    <body>
    </html>

  • Double click problem in Premiere CS4

    I can’t open my projects by double clicking on the projectname.proj
    Project name icon is missing and when I try to right click/open in and select Premiere it says:
    This is not windows valid Win32 program ( OS = Windows XP SP3)
    When I go to START / Premiere Pro SC4 and load Premiere first and then navigate to projectname.proj (The icon is still missing) the projects loads up nicely and everything is working just fine.
    I installed Premiere Pro CS on another PC where OS = Vista Business Edition using where same installation disc (I don’t know if this is legal but I had to try it) and there was not any problems at all.
    I just can’t use this PC because it was my wife’s and it took all the space on her hard disc so I must to remove it.
    sikter

    Hello again!
    I was ignoring this particular problem for a while but I did have some project loading issue from time to time.
    So I went to control panel\folder alternatives again and selected "advanced settings".
    There is an option to add new file type and make its path to the right "exe-file"
    I have tried it before but this time I noticed that I wrote command "OPEN" in the field where I was supposed to type what kind action system will perform.
    I tried "LOAD" and problem was still there. Then I realized how stupid I was:
    My OS is not in English but in Norwegian. I typed "Åpen" and almost immediately all my icons turned to pink.
    It was an extraordinary experience. Like in those chick movies
    I never experienced any bug-related problems after that.
    Hope this thread will help someone in the future.
    All credits to Mr. Hunt
    Best regards
    sikter

  • Double click problem in iTunes (query bug)

    With the recent iTunes update 7.7.1(11), I noticed that when switching between iTunes (esp. when it is in the compact mode) and other apps, a single mouse click in iTunes is often interpreted as a double click. This leads to distress when I try to pause the current track as the double click action pauses the track then plays it.
    To relieve this symptom, I need to minimize iTunes and maximize it again.
    Anyone else out there with the same problem?

    Hi,
    transaction VA23 is for Quotations..
    so in your select query write...
    select  vbeln
             erdat ........
              from vbak into corresponding fields of table <table name>
              *where vbtyp eq 'B'*. (Document type for Quotation)
    Then it works.
    Regards,
    Sathish Reddy.

  • With snow leopard, basic keyboard functions like double clicking on a desktop item now require me to hold control and then click on the track pad.  I'm trying to recall, I seem to remember Leopard allowing you to double click items to open them?

    I notice in iPhoto that if I used to be able to single/double click on a photo to view it but now if I click CONTROL and then the TRACK PAD, the options don't allow me to open JUST that photo in nearly full page format.  Any suggestions?

    "nearly full page" means that I used to be able to double click on a photo in iPhoto, and it would open up to a full image within iPhoto itself.  Now, there is absolutely no option to enlarge a photo unless you go to slideshow - no option to double click or side click or Control+click or Command+click or anything at all.  The small white arrow at the bottom right corner of every photo gives you options, but none are options that include enlarging a photo to see it bigger.  And no, you cannot double click it at all to even open it up in any other app unless you click/drag onto desktop and then open in Photoshop, or equivalent app. Yes, checked TP preferences.  No, it doesn't help.

  • Erratic mouse double-click problem (OS or Motherboard?)

    I have a MacBook
    MacBook4,1 / Intel Core 2 Duo  2,4 GHz (2Gb RAM)
    I have two mice: Microsoft Wireless Mobile Mouse 3000 v2.0 (bough lately) and a Logitech M-BT-96a (simple 2 buttons with wheel)
    I don't know if it is after upgrading to Snow Leopard (10.6.8) but one or the other are causing unwanted double-clicks!
    I downloaded Lion but didn't install yet.
    The trackpad act also funny especialy with touching to create clicks and double-clicks. I tough first it was because I press to heavely on each side of the trackpad… I changed my position: Same thing.
    I have two USB hubs daisy chained. Even when I'm unplugging them… It does the same thing.
    Thanks for your help

    As best as I can recall, my original eMac mouse lasted maybe a year before both the mouse tracking and the button contact switch began to act erratically. The button contact can wear out. If you still have your original eMac mouse, you've done an amazing job of treating it gently (maybe you can give me lessons --- I end up replacing mice every 2 years or so!).
    Can you try another USB mouse? Any third-party three button USB mouse will work as a basic three-button mouse without needing any additional software to be loaded; e.g., the Logitech Prefernce Pane offers more control over features of their mice, but you can do without it and just plug the mouse in.

  • Double click problem

    Hi all,
    I've got a problem using JSF (myfaces) and command links. When link is clicked several times quickly, the same page is shown and no response is genered. I think that exception is thrown during subsequent requests to same link, is there a way to ignore all clicks on same link after user clicks at the first time?
    This has been probably already discussed, are there easy solutions?
    Thanks,
    Andrey.

    Since the last post, I've run hardware test and came up with no problems. I also used another mouse with no difference in response. It does work with control click though. Re-installing Leopard.
    Gary

  • I have to "single-click" twice (not double click) to open an item in the Dock.

    Can someone confirm if this is Expected Behavior??   (OS = Mavericks)
    If you have Assigned an application in your Dock to a Desktop & Display in the application's Dock >> Options  (ex: Assigned To:  Desktop on Display 2):
    Click once on the application icon in the Dock, the application's Menu will populate on the top of your screen, but not the application itself (yet), click the application icon a second time, the application will now show too. 
    Docked Applications that do not have an Assigned To: Desktop & Display in the Dock options, you only need to single click.
    FYI:
    For odd Dock behaviors otherwise try this:
    You may have a corrupted Dock preferences file.
    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    ~/Library/Preferences/com.apple.dock.plist    (plist = preference list file)
    Click Go then move the com.apple.dock.plist file to the Trash, or move it to your Desktop.
    Restart your Mac and see if the behavior is resolved.  You will have re-configure your Dock settings.

    From where are you launching Mail? The only place, unless I've missed or forgotten something, you can launch an application with a single click is from the Dock. Is this what you're doing, or are you attempting to launch Mail from the Applications folder?
    Regards.

  • Yosemite problems with double click dock commands and keyboard shorcuts

    I have a mid 2012 macbook pro 17", i recently installed Yosemite although it fixed my internet problem (connection dropping randomly) now i am having issues with opening apps and files. Double clicking on a file launches the corresponding app but does't open the file i just get and message stating the app is not open anymore if click the file again. Finder keyboard shorcuts such as command+Q don't work. Can't access some menu items such as "about this mac". Dragging a file into the dock icon launches the app but doesn't open the file either.
    I have no idea what's causing this. anybody got a clue or having similar problems
    Thank you

    Same problem here. (Yosemite 10.0.1)
    the mouse is a 'team scorpion g-reaver' http://teamscorpion.net/ts2014/g-reaver_1.html
    It's work perfectly on the pc of my brother (he uses windows).
    It's a clean install...
    And has a funny fact... The Left Button was with this problem... So what I did? I changed the primary mouse button to the Right... Worked ok for almost 1~2 days... After that, the two buttons showed the double-click problem....
    But, I repeat, the mouse works perfectly in the windows of my brother '-'

  • Problem w/"combo boxes" cause the user to double click for the dropdown menu, but not for everyone.

    I have created a form with Adobe Acrobad Pro 9.
    There are a few "drop-down" boxes for people to choose options from.  I created them with the "Combo box" option.  They work perfectly fine on my laptop (Lenovo T500 windows 7, with all updates up to date.)  I sent the file to another exact same computer and that's when the problem came up.  When you click on the drop-down, the list will quickly appear and then disappear.  Then if you click it again it will stay open so you can choose your option.  However this only happens on "some" computers but not everyone's.  I emailed the exact same form out to other people in my office and they do not have any problems with the form.  There is no need to double click the drop down, it will just open up properly for them.
    Has anyone come across this? And if so, is there maybe a setting on these specific laptops that is preventing the "combo box" to not work properly?  I need to use this specific laptop as a "Kiosk" like a "check out" station for users to fill out the form to check out equipment.  I will be running in Reader so people can not make changes to the form.  (both the Acrobat Pro 9 version and the (most up to date) Reader version of the PDF form does the same "double-click" problem)  I need a date drop down and an equipment type drop down.
    Any suggestions would be greatly appreciated !
    Thanks !

    I've got this kind of problem with a form of mine (designed with LCD) :
    - combo boxes with font-color changing event handlers on :enter
    - on Acrobat 9 Pro : no problem
    - on Reader 8.3 :
          - first click seems to execute the event handler but stops the combo's opening
          - second click does open the combo
    Do you have event handlers on combo:enter ?
    Could the difference between comps where it works and comps where it doesn't be Acrobat's version ?

Maybe you are looking for

  • Batch splitting for Outbound delivery using BAPI_OUTB_DELIVERY_CHANGE

    Hi all, Let me explain the scenario first. We are going to create a delivery in SAP with some line items and send it to a non-sap third party WMS.  They will pick the goods and send the delivery confirmation back to SAP.  In SAP we need to delivery c

  • CS4 problem with Web Photo Gallery Plug-in

    I have googled answers to the question of how to get Web Photo Gallery back into Automate for CS4. I put the Content disc in, and went to Goodies-Adobe Photoshop CS4 Extended-Optional Plug-ins-Automate. There are three files there (ContactSheetll.plu

  • Defination and use of key figure in copa

    dear experts,    i'm new to co-pa.    can anyone explain to me the defination and use of key figure in copa?? many thanks mu

  • HT5622 Problem with language!

    My apple store account all the time changes it's language from english to spanish. What can i do to stop it?

  • B540 - front panel not responding

    The touch button (vloume, brightness) at the bottom of the screen are not working. Is it spoilt or have I accidentally disable them ?