Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

mouselistener  RSS feed

 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there ne way to make the mouselistener "listen" even if the window to the app. is minimized?

Justin
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Justin Fox:
is there ne way to make the mouselistener "listen" even if the window to the app. is minimized? ...

If the app window is minimized, how would a mouse event happen?
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mouse events can still happen even if the window of the application is non-focusable... are you trying to say that since my applications window is closed, I can't use my mouse?

Justin
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can still use your mouse - just not in your application. Which would mean that your application can't fire any MouseEvents.

(If you're using JDK 1.5+ you can use the MouseInfo class to find the current mouse pointer position at any time - even if your mouse is outside of the frame, or if it is minimized. However, you can't get any information about button presses, etc. There are ways to do this, but they require JNI.)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!