Results 1 to 2 of 2
Thread: Help with mouse listener please.
- 02-23-2012, 04:35 PM #1
Senior Member
- Join Date
- Nov 2011
- Location
- Turkey
- Posts
- 378
- Blog Entries
- 24
- Rep Power
- 2
Help with mouse listener please.
Hi everyone,
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 ?
Thank you.
- 02-23-2012, 04: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?How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Similar Threads
-
Need some help with mouse listener
By Serialcek in forum AWT / SwingReplies: 8Last Post: 01-07-2012, 10:20 AM -
Mouse listener
By chetoos in forum Advanced JavaReplies: 3Last Post: 06-23-2011, 09:23 PM -
Need Help with Mouse Listener!!!!
By Doggir in forum New To JavaReplies: 11Last Post: 05-05-2011, 11:48 PM -
Mouse Listener
By Quizerno in forum New To JavaReplies: 8Last Post: 03-17-2011, 05:25 AM -
Mouse Listener for mouse floating over object?
By Krooger in forum AWT / SwingReplies: 1Last Post: 11-18-2009, 04:34 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks