Doubt - mouse double click invokes both single and double click

Hi Friends,
I added mouse listener to a java component. In the mouseClicked() method, I have implementation for both mouse single and double click. When I try to double click that component it invokes the single click method first and the it invokes the double click method. My problem is when I try to double click that component it should invoke my double click method alone not single click too.
I'd be very grateful if someone can help me.
Thanks and Regards,
Sangeetha J

Your problem: a double click is two single clicks. The first click will always fire a single-click event. How's the computer supposed to know that another click is to follow?
All I think you could do is to instantiate a timer in the one-click method, set to whatever amount of time you think a double-click should take. If you get a second event while the timer's still active, it was a double-click and you can stop the timer and do the double-click action. Otherwise your timer should execute the single-click action after it timed out.
But this will make your GUI look like it's responding slowly to single-clicks.

Similar Messages

  • Programming button for single and double click

    I know how to programme a button to play a certain movie segment. However, in my current project I need to be able to programme a button in the menu so that
    1. on rollover - nothing
    2. on single mouse click - button colour changes + a parapraph of text appears on the menu screen in a predefined space
    3. on double click - a movie clip plays
    It might be a simple qiestion but I would greatly appreciate it if you could point me in the right direction.
    Thanks.

    Nick76 wrote:
    I know how to programme a button to play a certain movie segment. However, in my current project I need to be able to programme a button in the menu so that
    1. on rollover - nothing
    Do not change the highligh and it will look like nothing is happening (make sure auto activate is not beign used)
    2. on single mouse click - button colour changes + a parapraph of text appears on the menu screen in a predefined space
    3. on double click - a movie clip plays
    It might be a simple qiestion but I would greatly appreciate it if you could point me in the right direction.
    Thanks.
    Single and Double clicks cannot be done like that. (Some players using layered menus do require a click to get things seen but not really what you are speaking about.)
    Flash or Director may be better for this?

  • Detecting click ( single and double) on row (displayed using iterator)

    Hello All,
    I am using jdev 11.1.1.6
    I am displaying a list as below.
                                   <trh:tableLayout>
                                        <af:iterator value="#{pageFlowScope.Bean.List}" var="temp">
                                         <trh:rowLayout>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value1}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value2}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value3}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value4}"/>
                                          </trh:cellFormat>
                                        </trh:rowLayout>
                                        </af:iterator>
                                      </trh:tableLayout>
    My requirement is, when user clicks on a row, that row should be detected in backend and those value will be used.
    My requirement is, On single click row should be detected(in backend/bean)
    On double click, the values is saved(in backend/bean).
    How can i detect single and double click on a particular row ?

    I have updated the code as below, single click and double click are getting detected on a row
        <af:resource type="javascript">
                function singleClick(){
                    alert("Single Click");
                function doubleClick(){
                    alert("Double Click");
        </af:resource>
                                   <trh:tableLayout>
                                        <af:iterator value="#{pageFlowScope.Bean.List}" var="temp" onclick="singleClick()" ondblclick="doubleClick()">
                                         <trh:rowLayout>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value1}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value2}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value3}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value4}"/>
                                          </trh:cellFormat>
                                        </trh:rowLayout>
                                        </af:iterator>
                                      </trh:tableLayout>
    Now,
    suppose i have following values for some/any row,
    value1=20, value2="abc", value3=009, value4="Language" 
    How can i retrieve these values in java script (if in backing bean then very good)

  • Outlook 2010 apostrophe, single and double quotes are changes to question mark while sending mails to other internet receipient.

    We are using MS Outlook 2010 as our mail client. But we have noticed that whenevr we sent a mail to any other internet mail recipient all the "apostrophe", "single" and "double quotes" have automatically converted to ?. We have
    done almost all the workaround found in this site such as
    1.New a message and focus on the message window > click File > Options > Mail > Spelling and Autocorrect… > Proofing > AutoCorrect Options… > AutoFormat > clear the box before “Straight quotes” with “smart quotes”
    2. Used different encoding. We presently using US-ASCII for outgoing message. etc.
    Need your help to sort out these issues urgently.
    Waiting for a solution.

    Hi,
    What is your account type? IMAP, POP or Exchange?
    Send an email from the webmail, ask the recipient if this issue persists.
    As far as I know, this problem is always related to the encoding for outgoing messages, and here I suggest you try UTF-8:
    Go to File -> Options -> Advanced -> International options -> Uncheck "Automatically select encoding for outgoing messages", then select "Unicode (UTF-8)" beside "Preferred encoding for outgoing messages" -> OK.
    Hope this helps.
    Regards,
    Melon Chen
    TechNet Community Support

  • Left click acting like both left and right click

    Left Click button is acting like both left and right click button HP 2000 Notebook PC

    Could you try to use another mouse? If the other mouse works perfect, then your mouse pad must be damaged and you should look to get it fixed or just use a mouse instead. If not, then the settings on how the clicks act must have been altered. 
    Try to find a mouse to try first before looking at the settings for your mouse pad. You could maybe borrow one if anyone else has a computer with a mouse in your home.
    While you do that, I'll work on searching if this is common and if their is a solution if it's the software.
    I'm a programmer and a computer expert in training.
    Please feel free to click the "Kudos!" on the left if I helped. Note* I do not work for HP

  • How can I turn-off the apps which I have opened once in ISO 7.0.2. In previous version of ISO it was easy to turn- the opened apps by double clicking on home button and then click and hold on respective apps then click on cross sign.

    How can I turn-off the apps which I have opened once in ISO 7.0.2. In previous version of ISO it was easy to turn-off the opened apps by double clicking on home button and then click and hold on respective apps then click on cross sign but in this version I could not do so and my iPad appears slower.

    Close inactive apps
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe the app's windows upwards to close
    3. The app will fly off the screen

  • Single and double quotes entered in form field cause corruption?

    I am creating a database change request system using in APEX 2.2 and the main form has a description field (clob) and a API_description field (varchar2(4000)) that are text area fields on the page. The form seems to have trouble when the string data entered into the text area page items on the form contain single and double quotes.
    <br><br>
    I have pasted my test data below in this problem description(this is not true sql but it gets the point accross). I use the wizard created insert process to get the data into the db from the text fields in the wizard generated form, then use the wizard created fetch process to get the data back out and rendered on the same form. When I use the test data below, sometimes a few characters dissappear from my input data on the way out, sometime form fields go away, and their html is interspersed with the previous form field's data on the page. And I get different results on different tests with the same data.
    <br><br>
    Do I have to do something special for a vanilla htmldb text page item on a form to be able to receive single and double quotes in the string input in order to avoid that string data confusing the processing on the way in to the Database or on the way out for rendering?
    <br><br>
    Do I have to escape the characters? How do I do this?
    <br><br>
    The "varchar2(1) := ‘A’" part of the below TEST DATA string seem to cause the most trouble. The behavior is erratic - sometimes the pattern works, sometimes html is interspersed in one place, sometimes another (on the way back out)
    <br><br>
    START TEST DATA:
    Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
    Or
    Create a file with following sql in it
    Insert into sometable values(‘A’,sysdate);
    Or
    create new table as follows
    create table “someschema”.“sometable”
    (id number not null,
    Name varchar2(20) not null,
    Join_date sysdate
    Active varchar2(1) := ‘A’
    END TEST DATA:
    <br><br>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Here is an example of the test data being displayed after being fetched back out of oracle (this will look like gibberish when rendered in the forum system (end of problem description except for example):
    <br><br>
    env
    Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
    Or
    Create a file with following sql in it
    Insert into sometable values(‘A’,sysdate);
    Or
    crete new tableas follws
    crate table “somesca”.“sometable”
    har2(20) not null,
    Join_date sysdate
    Active varchar2(1) := ‘A’
    woextarea>
    <a class="eLink" title="Edit" href="javascript:popupURL('f?p=4000:371:204538675714370::::P371_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:1034609472735510,104,2');" tabindex="999"><img src="/i/e.gif" alt="Edit" class="eLink" /></a></td></tr><tr><td nowrap align="right"><label ...

    I found a good php related post that has a nice set of the potentially problematic characters (this is in the context of word pasted into IE I think). I am pretty confident that at least single curly quotes do not work well in apex 2.2). I would not be surprised if some of the others were trouble as well.:
    http://lists.evolt.org/archive/Week-of-Mon-20030602/141975.html
    here is the list
    $trans_tbl[chr(34)] = '"' ;          //      quote
              $trans_tbl[chr(38)] = '&' ;          //      ampersand
              $trans_tbl[chr(60)] = '<' ;          //      less-than
              $trans_tbl[chr(62)] = '>' ;          //      more-than
              $trans_tbl[chr(128)] = '€' ;     //      euro
              $trans_tbl[chr(129)] = '€' ;      //     euro
              $trans_tbl[chr(130)] = '‚' ;      //     low quote
              $trans_tbl[chr(131)] = 'ƒ' ;      //     florin
              $trans_tbl[chr(132)] = '„' ;      //      double low quote
              $trans_tbl[chr(133)] = '…' ;      //     ellipsis
              $trans_tbl[chr(134)] = '†' ;     //     dagger
              $trans_tbl[chr(135)] = '‡' ;      //     double dagger
              $trans_tbl[chr(136)] = 'ˆ' ;      //     circumflex
              $trans_tbl[chr(137)] = '‰' ;      //     per thousand
              $trans_tbl[chr(138)] = 'Š' ;      //     S caron
              $trans_tbl[chr(139)] = '‹' ;      //     left angle quote
              $trans_tbl[chr(140)] = 'Œ' ;      //     OE ligature
              $trans_tbl[chr(142)] = 'Ž' ;      //     Z caron
              $trans_tbl[chr(145)] = '‘' ;      //     left single quote
              $trans_tbl[chr(146)] = '’' ;      //     right single quote
              $trans_tbl[chr(147)] = '“' ;      //     left double quote
              $trans_tbl[chr(148)] = '”' ;      //     right double quote
              $trans_tbl[chr(149)] = '•' ;      //     bullet
              $trans_tbl[chr(150)] = '–' ;      //     en dash
              $trans_tbl[chr(151)] = '—' ;      //     em dash
              $trans_tbl[chr(152)] = '˜' ;      //     small tilde
              $trans_tbl[chr(153)] = '™' ;      //     trademark
              $trans_tbl[chr(154)] = 'š' ;      //     small s caron
              $trans_tbl[chr(155)] = '›' ;      //     right angle quote
              $trans_tbl[chr(156)] = 'œ' ;      //     oe ligature
              $trans_tbl[chr(158)] = 'ž' ;      //      small z caron
              $trans_tbl[chr(159)] = 'Ÿ' ;      //     Y with diaeresis
    <br>
    -Geoffrey

  • Does anybody know any software for the Mac that I can run round robin, single and double elimination tournaments?

    Does anybody know any software for the Mac that I can run round robin, single and double elimination tournaments?  I help run tournaments but using excel for pool play and the web for bracket play, but if wifi is not available I have no way of running brackets for prize play.  Can some one help point me in the direction of software that I can use locally on my Mac Pro. 
    Thanks,
    Chris
    <E-mail Edited by Host>

    Splendid City Team Sports Scheduler, and Sports Scheduling Software System

  • Disable Or Remove Extensions in Safari Open Safari. Click the Safari button, and then click Preferences. Under Preferences, click Extensions, and then do one of the following: To disable ALL extensions, click the toggle switch from ON to OFF. To disable a

    I FINALLY FOUND A WAY TO UNINSTALL "COUPON-DROP-DOWN" ANNOYING POP-UPS.
    Disable Or Remove Extensions in Safari
    Open Safari.
    Click the Safari button, and then click Preferences.
    Under Preferences, click Extensions, and then do one of the following:
    To disable ALL extensions, click the toggle switch from ON to OFF.
    To disable a single extension, click it, and then uncheck the Enable box.
    To remove a single extension, click it, and then click the Uninstall button.
    Click the X in the top right.

    Hello Wontsey & Welcome
    On 6-4-06 I installed Norton Internet Security 3.0.1 for Mac. I thought maybe my problem was related to the firewall part so I unistalled it and turned the Apple firewall that came with the computer back on.
    This did not help. In fact, when I try to open “Help” from the desktop menu the program opens and then immediately closes so I can’t access it.
    I hate to have to tell you this Norton is the problem, looking into uninstalling it, the uninstallers that came with it are not effective so no matter you do not have the CD/DVD go to their site to get the Uninstaller
    UseCocktail or OnyXto find the invisable files. Just follow Macjacks directive.
    This is covered in this Topic thread,abandoning Norton Internet Security see the files Macjack speaks of in the topic thread. If you have questions post in the same forum a new topic this thread is archive, click on the link and then click"back to topic list". This is why i first came to Apple discussions, to get help with the mess Norton can make on Panther and found help as you will. It is not a Safari issue per say, rather a Norton problem.
    Best of luck.
    Regards; )
    Eme~

  • Excel is throwing error when it click print : 'No printers are installed. To install a printer click the File tab, and then click Print. Click No Printers Installed, and then click Add Printer. Follow the instructions in the Add Printer dialog box'

    Excel is throwing error when it click print : 'No printers are installed. To install a printer click the File tab, and then click Print. Click No Printers Installed, and then click Add Printer. Follow the instructions in the Add Printer dialog box'
    Word, and powerpoint application are working fine.  
    Environment :  Windows 7 64-bit, MS Office 2013 64-bit
    Steps to recreate
    (i)  Create new user account and add to any group ( do not log on using this
     account)
      (ii)  runas /user:<new user account>  <fullpath>\excel.exe
       it will ask password so enter on command prompt
    (iii)  open any excel document  and click File->Print
      (iv)  verify result  (it is failing) it pop ups below error
     Error:`Microsoft Excel
     No printers are installed. To install a printer click the File tab, and then click
     Print. Click No Printers Installed, and then click Add Printer. Follow the
     instructions in the Add Printer dialog box.                                                                                                               

    Sorry for late reply i was not at work
    I have a default set excel is still throwing error. Interestingly winword , powerpoint and publisher are working fine. I am able to print from all office applications except Excel.
     Probably excel behaves differently from other office applications.
     Probably it is a bug in excel
    Workaround : Log on to a system once using newly created account then runas excel using this account then print works fine.
    It means something in user profile should be configure to run excel print operation. Could you please somebody help what I need to configure in user profile that makes print operation success?

  • Can someone tell me why can't I delete a picture of a text message conversation? I touch and hold a picture in IOS7.0.3; I touch More, I click the picture(s) and I click the garbage bin. The picture gets deleted, but then it comes back in a seconed!

    Can someone tell me why can't I delete a picture of a text message conversation? I touch and hold a picture in IOS7.0.3; I touch More, I click the picture(s) and I click the garbage bin. The picture gets deleted, but then it comes back in a second!

    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")

  • I'm trying to print Checks with Quicken. the print is 1/2 way across check with single and doubles

    My printer is the HP Laserjet 1102W When I load a single or double check into the manual feed vertically taken from a 81/2 x 11 sheet of checks Quicken prints so that only the date and amount show up in the middle of the check. I have used these checks for years with the manual feed on a Laserjet 4 Plus. How do I get the printing to move so that it covers the whole check?
    Howard Wexler

    Bobreba wrote:
    I am using Quicken Essentials 1.7.4 on a [Mac Pro, 2.8 Ghz Quad Core Intel Xeon with 16 Gb of memory], running 10.7.5.  I am in the process of upgrading everything to work on Yosemite and Quicken seems to be the most difficult problem to overcome.
    Thanks for your response and feedback.
    I would recommend you continue with Quicken Essentials.  As noted by others, it performs well on Yosemite.
    My personal experience is Quicken 2007 for Mac also on 10.7.5 (with many reports of it both updated and successfully running on Yosemite) and I personally would not touch Quicken Essentials with a 10 foot pole -- BUT, if it ain't broke for you, don't fix it!

  • LR4 invokes both 32- and 64-bit Photoshop diff times. Want 64.

    Searched various ways -- no threads found.
    When I go out of LR4.1 to edit in Photoshop I see both 32- and 64-bit versions of PS v5.5 start -- judging from version string in the splash graphic, which includes the "x32" or "x64". Yesterday, every time I side-tripped it called v12.something.x32. This morning it was the 64-bit. I usually click the image in LR4.1 and type <CTRL-E> but yesterday I sometimes used the menu fly-out under "Photo --> Edit In", too.
    Looking into this, I read in threads yesterday that both versions are on any machine so went looking for two different ".exe" files but found only one.
    My OS is Win7 Pro, 64-bit.
    Any suggestions of ways to guarantee that the 64-bit version opens every time?
    TIA,
    jonathan7007

    Victoria,
    Thank you for answering, and I looked at the Reg change discussed. The Adobe documentation doesn't tie this change to the issue I am having. I "start" PS in two different ways. But if I go to the "photoshop.exe" file as shown in Windows Explorer, I sure want PS 64-bit to start. That file is the one to which LR points as set up by LR's Preferences or whatever dialog box appeared. PS is named as the External Editor in the Prefs tab., "External Editing". PS is named as the first entry on the flyout menu, and I often invoke it with <CTRL-E>.
    I was hoping for more users to look at their splash screens at PS start and share what version starts on their 64-bit systems. Perhaps there is a pattern that explains why one version or another starts.
    Questions for other LR/PS users:
    What version starts when you side-trip to PS?
    Whare are the two versions differentiated as "start" resources? (not deep in the Registry, I mean.)
    Do I care which starts?
    jonathan7007

  • URGENT!! CELLWRAPPER single and double quot issues???

    REP-50003: Bad parameter:  CELLWRAPPER='I get this error whenever I try and use single or double quotes as a cellwrapper.
    However if I do [SPACE][SPACE] as a cell wrapper this works fine?Is this a bug? I'm sure we have version "10.1.2.0.2"?

    It does appear to be a bug. Look here on Metalink for details.

  • Data Doubler - Format for both OSX and Windows 7 to read/write?

    Hello! I have a Mid-2012 MacBook Pro 13" and I've ordered the OWC Data Doubler with a 1.5TB HDD to put into the optical bay. I have a couple of questions.
    1. What format should I use for the HDD to allow both my OSX and Windows 7 sides read and write to it? I have a Bootcamp partition, but if it's possible I'd like for both OSX and W7 to be able to read and write to this drive. That way, when I'm in OSX I can view iTunes and media, but if I'm in W7 I can still have the same access. That way, I don't have to worry about "Oh, I downloaded this on the windows side ... I have to figure out how to get it over to the mac side" (or vice versa). Essentially allowing the 1.5TB HDD to be a "go between" for the two.
    2. This is a minor question, but will the eject button do something to the HDD if it gets pressed when the optical drive is out and the HDD/Data Doubler is in? I don't plan on pressing it, but I was wondering if I need to dig into terminal (or somewhere else) to "disable" the button or maybe just reassign it so that instead of ejecting it does some other function?
    I have heard of "MacDrives" for Windows, but I haven't used it. If this is a better option (to put the HDD into Mac OS Extended Journaled and use an application to allow W7 to read/write) that's fine.
    I am putting in the 1.5TB HDD. The end goal, if possible, is to allow the Windows 7 side to read/write to it. As long as it's not a "hacked together" method, I do not mind what way it's done.
    Any thoughts? I appreciate it!

    Use Winclone for the Windows partition and CCC for the OSX partition.

Maybe you are looking for