Results 1 to 2 of 2
Thread: Help with mouse listener please.
- 02-23-2012, 05:35 PM #1Senior Member
- Join Date
- Nov 2011
- Blog Entries
- Rep Power
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 ?
- 02-23-2012, 05:39 PM #2
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?
- By Serialcek in forum AWT / SwingReplies: 8Last Post: 01-07-2012, 11:20 AM
- By chetoos in forum Advanced JavaReplies: 3Last Post: 06-23-2011, 09:23 PM
- By Doggir in forum New To JavaReplies: 11Last Post: 05-05-2011, 11:48 PM
- By Quizerno in forum New To JavaReplies: 8Last Post: 03-17-2011, 06:25 AM
- By Krooger in forum AWT / SwingReplies: 1Last Post: 11-18-2009, 05:34 AM