javawindow-decoration

How to trigger an event in the decorated part of the frame?


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


Solution

  • 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.