Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37985

Re: What's the difference between mouseClicked and mousePressed?

Path csiph.com!aioe.org!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Daniele Futtorovic <da.futt.news@laposte.net>
Newsgroups comp.lang.java.programmer
Subject Re: What's the difference between mouseClicked and mousePressed?
Date Tue, 23 Jan 2018 19:41:59 +0100
Organization A noiseless patient Spider
Lines 12
Message-ID <p47vlr$gob$1@dont-email.me> (permalink)
References <65e683ec-444d-4a80-b3b4-e6de98bacc5e@googlegroups.com> <p47gev$ns$1@dont-email.me> <46ceca25-eec6-41b4-b304-f5424800b9eb@googlegroups.com> <f7bbe8fe-e0b7-406b-9d72-5e1f0a99ee67@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
Injection-Date Tue, 23 Jan 2018 18:42:03 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="6e95f861c1860eea55e7b55e9dfb22b8"; logging-data="17163"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CdLJ1mUGI2YQV04qyJm17"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2
In-Reply-To <f7bbe8fe-e0b7-406b-9d72-5e1f0a99ee67@googlegroups.com>
X-Antivirus-Status Clean
Content-Language en-GB
X-Antivirus AVG (VPS 180123-8, 01/23/2018), Outbound message
Cancel-Lock sha1:X2N0S506hJCkZ0WPCctspaYtkTc=
Xref csiph.com comp.lang.java.programmer:37985

Show key headers only | View raw


On 2018-01-23 15:47, Eric Douglas wrote:
> On Tuesday, January 23, 2018 at 9:36:07 AM UTC-5, Eric Douglas wrote:
> I'm not seeing the point to mouseClicked since it doesn't appear to work with touch events and I'm testing our application on a Surface Pro.  If I'm looking for single click I can use mouseReleased and for double click I can use mousePressed and get the same result?
> Oddly mouseClicked will only tell you if you got a single mousePressed immediately followed by a mouseReleased in the same location, but both of those events translate to touch events while mouseClicked does not?

Check the Javadoc for java.awt.event.MouseEvent.

Also, MouseEvent has a #getClickCount(). Might be what you're looking for.

-- 
DF.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 05:17 -0800
  Re: What's the difference between mouseClicked and mousePressed? Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-01-23 09:22 -0500
    Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 06:35 -0800
      Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 06:47 -0800
        Re: What's the difference between mouseClicked and mousePressed? Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-23 19:41 +0100
          Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 11:03 -0800
            Re: What's the difference between mouseClicked and mousePressed? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2018-01-23 14:06 -0600
              Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 12:41 -0800
                Re: What's the difference between mouseClicked and mousePressed? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2018-01-23 14:54 -0600
                Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 13:11 -0800
                Re: What's the difference between mouseClicked and mousePressed? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2018-01-23 15:18 -0600
                Re: What's the difference between mouseClicked and mousePressed? Eric Douglas <e.d.programmer@gmail.com> - 2018-01-23 13:36 -0800
                Re: What's the difference between mouseClicked and mousePressed? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2018-01-23 15:48 -0600
      Re: What's the difference between mouseClicked and mousePressed? Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-01-23 09:55 -0500

csiph-web