Frage

I would like to trigger an event when the mouse is in the decorated part of the frame. Is it possible in Java ?

I tried to add listeners to the frame, to the panel, etc and i tried with several methods but nothing works. And it works fine when i'm in the Frame

thank you for your help

War es hilfreich?

Lösung

You can use a Jpanel and embed the components inside this Panel.And then write your code in mouseEntered Event. (The Events can be found By :

1)Right click on the  panel.

2)Select  Properties and select events tab and mouse enterd event.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top