Help with mouse listener please.
I have a JFrame mainFrame, which has a JMenuBar mainMenuBar.
My mainFrame is undecorated, so I want to add a MouseListener to my mainMenuBar, and let the user move the JFrame as desired by holding the mainMenuBar.
Can you help me with:
How can I get where the mainFrame is at the moment when mouse is click on the mainMenuBar ?
How I can track, how far in which direction the user moves the mouse and put the mainFrame in that location ?
Where should I start from ?
Re: Help with mouse listener please.
I assume you started by reading this tutorial: How to Write a Mouse Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing > Writing Event Listeners)
If so, what exactly have you tried so far? Where exactly are you stuck?