Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7012117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:12:51+00:00 2026-05-27T22:12:51+00:00

My question concerns how to handle with simultaneous mouse events with Swing. Both a

  • 0

My question concerns how to handle with simultaneous mouse events with Swing.

Both a MouseMotionListener and a MouseListener are added to follow a JPanel.

I have an object whose rotation takes places according to the x and y coordinates of the mouse pointers location (implemented by mouseMoved method of MouseMotionListener).

I’ve also got a MouseListener that performs its actions according to implemented mouseReleased() method.

The object is rotating neatly according to MouseMotionListener but a problem arises when the mouse button is pressed. As the mouse is now moved the rotation stops as obviously the JPanel is now waiting the mouseReleased() method to be executed.

Any ideas what’s the best way to make these events happen simultaneously so that both the rotation according to the mouse pointers coordinates and operations according to mouseReleased() can be performed concurrently without disrupting each other?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:12:52+00:00Added an answer on May 27, 2026 at 10:12 pm

    An old article going into swing threading specifics:

    http://www.javaworld.com/javaworld/jw-08-2007/jw-08-swingthreading.html?page=1

    Worth a read as to the whys and hows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question concerns c# and how to access Static members ... Well I don't
My question concerns Google Web Toolkit (GWT). I'm about to begin development for a
My question concerns markup that surrounds some of the default phone number labels in
In fact, my question concerns an algorithm. I need to be able to attach
My question concerns how I can use one comments controller with multiple 'belongs to'
While this question concerns the formatting of LaTeX within Emacs (and maybe Auctex), I
I have 2 questions concerns about using shared memory. I'm using CreateFileMapping to create
I have a rather large, dynamic sparse matrix object class to write, and I
I have several concerns when trying to do DDD development with EF 4.2 (or
My question concerns Silverlight (but I guess WPF as well). Basically I know, how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.