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


Groups > comp.lang.java.programmer > #31585 > unrolled thread

mouse listener on javafx swing node

Started byPhilipp Kraus <philipp.kraus@flashpixx.de>
First post2015-04-19 16:12 +0200
Last post2015-04-20 15:03 -0400
Articles 4 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  mouse listener on javafx swing node Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-04-19 16:12 +0200
    Re: mouse listener on javafx swing node Jeff Higgins <jeff@invalid.invalid> - 2015-04-19 19:02 -0400
      Re: mouse listener on javafx swing node Philipp Kraus <philipp.kraus@flashpixx.de> - 2015-04-20 18:40 +0200
        Re: mouse listener on javafx swing node Jeff Higgins <jeff@invalid.invalid> - 2015-04-20 15:03 -0400

#31585 — mouse listener on javafx swing node

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2015-04-19 16:12 +0200
Subjectmouse listener on javafx swing node
Message-ID<mh0amo$2vsb$1@ariadne.rz.tu-clausthal.de>
Hello,

I use a JavaFX application but one of my UI components is a Swing 
componentent, which is added with a SwingNode to my JavaFX UI.
The Swing component uses a MouseAdapter, which overloads the 
mouseClicked and mouseMove method, but on my SwingNode the mouseMove
does not work. I would like to catch mouve move, click and drag event 
on a swing node, so how can I pass the events on the SwingNode down to 
the Swing
component?

Thanks

Phil

[toc] | [next] | [standalone]


#31586

FromJeff Higgins <jeff@invalid.invalid>
Date2015-04-19 19:02 -0400
Message-ID<mh1c55$pol$1@dont-email.me>
In reply to#31585
On 04/19/2015 10:12 AM, Philipp Kraus wrote:
> Hello,
>
> I use a JavaFX application but one of my UI components is a Swing
> componentent, which is added with a SwingNode to my JavaFX UI.
> The Swing component uses a MouseAdapter, which overloads the
> mouseClicked and mouseMove method, but on my SwingNode the mouseMove
> does not work. I would like to catch mouve move, click and drag event on
> a swing node, so how can I pass the events on the SwingNode down to the
> Swing
> component?
>

The manual states:
"All the input and focus events are forwarded to
the JComponent instance transparently to the developer."

Some reasons why the mouseMove does not work.

You've made a mistake in your code, and
there is a bug in the library code,
are among the possibilities.

[toc] | [prev] | [next] | [standalone]


#31587

FromPhilipp Kraus <philipp.kraus@flashpixx.de>
Date2015-04-20 18:40 +0200
Message-ID<mh37lm$r5r$1@ariadne.rz.tu-clausthal.de>
In reply to#31586
On 2015-04-19 23:02:12 +0000, Jeff Higgins said:

> On 04/19/2015 10:12 AM, Philipp Kraus wrote:
>> Hello,
>> 
>> I use a JavaFX application but one of my UI components is a Swing
>> componentent, which is added with a SwingNode to my JavaFX UI.
>> The Swing component uses a MouseAdapter, which overloads the
>> mouseClicked and mouseMove method, but on my SwingNode the mouseMove
>> does not work. I would like to catch mouve move, click and drag event on
>> a swing node, so how can I pass the events on the SwingNode down to the
>> Swing
>> component?
>> 
> 
> The manual states:
> "All the input and focus events are forwarded to
> the JComponent instance transparently to the developer."
> 
> Some reasons why the mouseMove does not work.
> 
> You've made a mistake in your code, and
> there is a bug in the library code,
> are among the possibilities.

Thanks for the great hint, so that helps to debug the code

Phil

[toc] | [prev] | [next] | [standalone]


#31588

FromJeff Higgins <jeff@invalid.invalid>
Date2015-04-20 15:03 -0400
Message-ID<mh3iho$3j9$1@dont-email.me>
In reply to#31587
On 04/20/2015 12:40 PM, Philipp Kraus wrote:
> On 2015-04-19 23:02:12 +0000, Jeff Higgins said:
>
>> On 04/19/2015 10:12 AM, Philipp Kraus wrote:
>>> Hello,
>>>
>>> I use a JavaFX application but one of my UI components is a Swing
>>> componentent, which is added with a SwingNode to my JavaFX UI.
>>> The Swing component uses a MouseAdapter, which overloads the
>>> mouseClicked and mouseMove method, but on my SwingNode the mouseMove
>>> does not work. I would like to catch mouve move, click and drag event on
>>> a swing node, so how can I pass the events on the SwingNode down to the
>>> Swing
>>> component?
>>>
>>
>> The manual states:
>> "All the input and focus events are forwarded to
>> the JComponent instance transparently to the developer."
>>
>> Some reasons why the mouseMove does not work.
>>
>> You've made a mistake in your code, and
>> there is a bug in the library code,
>> are among the possibilities.
>
> Thanks for the great hint, so that helps to debug the code
>

An example of "asking good questions" :
<http://stackoverflow.com/questions/26420701/cant-get-mouse-event-from-any-other-javafx-8-node-after-getting-mouse-pressed-e>


[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web