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

  • Home
  • SEARCH
  • 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 845511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:27:49+00:00 2026-05-15T06:27:49+00:00

I am writing a Java Swing application that needs to have a window receive

  • 0

I am writing a Java Swing application that needs to have a window receive mouse movement events when the application is not activated – think of it like a global always-on-top toolbar that animates when the mouse passes over it.

From my research so far, I have seen that the Mac Java JRE only passes events when the application has focus.

It does not appear to be a limitation of the OS, so I was hoping that there was a system property, an application package property or a system call that enabled non-activated event handling. Failing that, some method of globally capturing mouse movement events and passing them in to the Java application.

Thanks for any suggestions…

Edit: One further question: Once mouse move events have been captured, how do you feed them into Swing so that they are treated in the same was as native OS mouse events — by finding the component under the mouse and sending a MouseEvent to it…

  • 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-15T06:27:49+00:00Added an answer on May 15, 2026 at 6:27 am

    This isn’t possible with pure Java.
    You will need JNI and to write a global keylistener (or a keyboard hook) in C++ or another language.

    Here are some topics about Global KeyListener:

    • Coderanch.
    • My own topic on Stack Overflow
    • Stack Overflow
    • Keyboard hooks in Mac OS X

    On the last topic: this was a given solution for OSX.

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

Sidebar

Ask A Question

Stats

  • Questions 506k
  • Answers 506k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer var tree = {} function addToTree(tree, array) { for (var… May 16, 2026 at 3:40 pm
  • Editorial Team
    Editorial Team added an answer rake gems:install does what you would expect. It calls out… May 16, 2026 at 3:40 pm
  • Editorial Team
    Editorial Team added an answer Everything you stated. Everything Darin stated. Plus... Void is a… May 16, 2026 at 3:40 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am writing an application in java (1.6) using swing. I currently have a
I'm writing a Java Swing application for the Mac using Java 1.6. I've read
I'm writing a Java application that's working with Apache Derby via JDBC. I'm having
I have inherited development of a Java/SWT application running on Windows only. One of
I am in the process of writing a cross platform Swing based application in
i'am writing some swing applications(not rich clients, running standalone) with a lot of domain
I am currently in the process of writing some software in Java that I
I am writing a web application that will serve as a configuration for a
For a current project, we're designing a client desktop application that parses text files
Say, You have an application which lists down users in your application. Ideally, if

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.