Path: csiph.com!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!2a00:1d38:fa:105::184.MISMATCH!feed.usenet.farm!feeder4.usenet.farm!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: What's the difference between mouseClicked and mousePressed? Date: Tue, 23 Jan 2018 09:22:20 -0500 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <65e683ec-444d-4a80-b3b4-e6de98bacc5e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 23 Jan 2018 14:22:24 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="4c3b38fc1b26d1746a68c0cc1cf9df2c"; logging-data="764"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0J1flf/AmmS1Ac6d5Kc59" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 In-Reply-To: <65e683ec-444d-4a80-b3b4-e6de98bacc5e@googlegroups.com> Content-Language: en-US Cancel-Lock: sha1:UO0ktPwtAyxU97hQfMYaXD/pqPc= Xref: csiph.com comp.lang.java.programmer:37980 On 1/23/2018 8:17 AM, Eric Douglas wrote: > They appear to do the same thing, except you can't fire mouseClicked with touch events. Pressed fires when the mouse button goes down, Released and Clicked fire when it goes back up again. Try this: Mouse onto listening component Press a button W-a-i-t Release the button ... and note the time stamps on the various events. You can also play around with multiple buttons, sliding the mouse onto the listening component with a button already down, and so on -- I'm sure a little experimentation will clarify things. (Disclaimer: I have no clue about Swing/AWT and touch devices.) -- esosman@comcast-dot-net.invalid One thousand ninety-three days to go.