Results 1 to 3 of 3
  1. #1
    ninjaturtlez is offline Member
    Join Date
    Dec 2011
    Posts
    15
    Rep Power
    0

    Default MouseMotionListener

    Is there a way to make a mouse motion listener only affect a certain area of the screen?

    For example the program MS Paint can draw only on the white area.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: MouseMotionListener

    make a mouse motion listener only affect a certain area of the screen?
    No. The listener is confined to the component that is listening. If you want to subdivide that area your code will have to look at the location of the mouse.

  3. #3
    ninjaturtlez is offline Member
    Join Date
    Dec 2011
    Posts
    15
    Rep Power
    0

Similar Threads

  1. MouseMotionListener
    By hubikmar in forum AWT / Swing
    Replies: 2
    Last Post: 04-15-2011, 11:35 AM
  2. using the mousemotionlistener and mouselistener
    By ravirajparab in forum New To Java
    Replies: 1
    Last Post: 12-21-2009, 07:11 PM
  3. MouseMotionListener 'scrolling'
    By Thez in forum Java 2D
    Replies: 3
    Last Post: 03-12-2009, 11:48 AM
  4. Replies: 0
    Last Post: 04-23-2008, 08:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •