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


Groups > it.comp.java > #8738

Re: doppio click su jTab

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail
From Gulp® <gulp@hotmail.it>
Newsgroups it.comp.java
Subject Re: doppio click su jTab
Date Thu, 29 Oct 2015 13:58:11 +0100
Organization Aioe.org NNTP Server
Lines 30
Message-ID <n0t5bv$kfu$1@speranza.aioe.org> (permalink)
References <n0t03f$7tv$1@speranza.aioe.org>
NNTP-Posting-Host iEIXdzl/eNc4wUOSv1Veyw.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-15; format=flowed
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com it.comp.java:8738

Show key headers only | View raw


Il 29/10/15 12:28, Gulp® ha scritto:
> private void tableDataMouseClicked(java.awt.event.MouseEvent evt) {
>           if (evt.getClickCount() == 2) {
>
>               JOptionPane.showMessageDialog(null, vox + " " + sgl);
>      }
>      }
>
> private void JListMouseClicked(java.awt.event.MouseEvent evt) {
>          if (evt.getClickCount() == 2) {
>              JList jl = (JList) evt.getSource();
>              EliminaRiga(jl);
>          }
>
> Il primo void il cui Listner è su una Javatab non funziona. Il secondo
> il cui Listner è su una JList funziona.
> Ma il primo se pongo il getClickCount()==1 funziona.
> Ergo il listner funziona, ma non sente il doppio click su una JavaTab,
> perchè?
>

Trovato, usando mousePressed  :
public void mousePressed(MouseEvent evt) {
         if (evt.getClickCount() == 2) {
             System.out.println(vox + " " + sgl);
         }

-- 
Gulp®
(forse mi sono perso qualcosa :))

Back to it.comp.java | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

doppio click su jTab Gulp® <gulp@hotmail.it> - 2015-10-29 12:28 +0100
  Re: doppio click su jTab Gulp® <gulp@hotmail.it> - 2015-10-29 13:58 +0100
    Re: doppio click su jTab Gulp® <gulp@hotmail.it> - 2015-10-29 14:25 +0100

csiph-web