Mouse position on screen

is there any way to get the mouses position on the screen (not a window)?
Stephen

Component c = (Component)e.getSource();
Point p = e.getPoint();
SwingUtilities.convertPointToScreen(p, c);
System.out.println(p);

Similar Messages

  • Zooming image from mouse position(like in  windows vista photo gallery)

    hello all;
    here's my situation, hope someone can help..
    i wanna Zoom an image, which zoom from my mouse position
    like in windows photo gallery in windows vista
    so i do this..
    g2.translate(iMoux,iMouy);       
            g2.scale(zoom, zoom);       
            g2.translate(-iMoux,-iMouy);       
            g.drawImage(icon.getImage(), iSposx, iSposx, d.width/2-iValue, d.height-iBawah, null);
            g.drawImage(icon2.getImage(), d.width/2, iSposy, d.width/2-iValue, d.height-iBawah, null);the problem come when i move my mouse to the different location (like from top right to bottom left)
    the zoom image displayed in the screen like jump from latest location to new location
    anybody can help me...a clue how to do that?
    thx appreciate your help guys
    mao
    Edited by: KingMao on 31 Mei 08 14:27

    Hi Frank.
    Thanks for the response.
    Agreed, the pertinent question is why can't my colleague edit the JPG exported by Aperture. It's probably also worth pointing out, the same problem occurs with JPGs exported from iPhoto.
    The Windows software usually plays nicely with JPGs by all acounts, just not the ones I send - which I do via eMail or my public space on Mobile Me incidently.
    So, another key question is: all settings being equal (color profile, quality, etc.) are the JPGs as produced by iPhoto and Aperture indistinguishable from those produced by other apps on other platforms - i.e. does the use of JPG enforce a common standard?
    If that is the case, I suspect ours might be a permissions issue.
    According to the Microsoft support page on editing in Windows Live Photo Gallery, the inability to edit a picture is commonly caused by unsupported file type, or read-only attribute set on the file.
    Unfortunately, he and I are not in the same place, and he's not particularly au-fait with this type of problem solving. Hence, before involving him, I'd like to know:
    1. it's possible (i.e. someone else does it), and,
    2. what's involved (at my end and/or his).
    Thanks again,
    PB

  • Detect Mouse Position?

    I can't (within actionscript 3) determine where the mouse is
    relative to the flash player window.
    I can get stage.mouseX and stage.mouseY but those coordinates
    are in relation to the size of the entire ORIGINAL stage at compile
    time.
    I need to know where the mouse is in relation to the window
    playing the swf, which is significantly smaller than the original.
    That is the play screen has been resized.
    If I zoom way in and scroll to the right edge of the stage
    and mouseover a spot on the right edge, then trace the mouse
    position (in a mouseover event proc) it shows me a number that is
    the width of the ORIGINAL stage. It seems to be completely
    oblivious to the play window.
    Is there any way at all to determine where the mouse is
    relative to the play window?
    For example,
    if the original stage is 1350 and the play window is 540 and
    I'm zoomed WAY in and scrolled all the way to the right and
    I put the mouse directly in the middle of the window,
    I need something that tells me (in actionscript 3) that the
    mouse's x coordinate is at 270, NOT 12XX (somewhere near the end of
    the orginal size of the stage).
    Is this possible in Flash C3??

    Hi there!
    I don´t know if it´s right but have you tried
    localX
    localY
    from the occuring MouseEvent?
    Hope that helps :)
    CU
    Ingo

  • Checking Mouse position every second?

    Hello,
    I have a program that needs to check the mouse position on the program's window every loop, but if I use MouseMotionListener's mouseMoved(), it is not what I want because it checks ONLY when I move my mouse, it doesn't check if I don't move my mouse. For example, I have a while loop will check if the mouse pointer now in the area of (25, 50), the program will do something. Thus what should I use? I tried moveEntered(), it doesn't work as well any hints?
    Andy

    okay, for example, like Warcraft 3, starcraft type RTS game, when you move your mouse pointer to the edge of the screen, the screen will scroll over the map. But remember when you move to the edge of the screen, it will move automatically so you don't need to move your mouse until you want to stop moving the screen, you move away your pointer from the edge right? With mouseMoved(), it doesn't work that way cuz whenever it checks mouseMovement only, if there is no mouse movement, it doesn't know whether if the pointer is on the edge or not. How do I check that, since I don't wanna use a Runnable class to do that, I rather use a loop to check it. Which method that I can get the mouse pointer position by not implementing MouseListener.
    Andy

  • Control position vs mouse position

    I want to create a tooltiptext for example. I have the mouse postion, the buttonposition and the window-position. So if I'm moving the mouse-cursor over the button, a light needs to go on. To find the position of the button in function of the X-axis is no problem, but from the top I can't find. My conclusion --> The "top button position" is not right.
    Attachments:
    delme.vi ‏34 KB

    You didn't include handy\mouse.vi, so we can't see how you're reading the mouse position. Functions that read the mouse position often report it relative to the current window. You then need to add the window position to it.
    FYI: Tooltips are included in LabView 6.x. Instead of just being able to set the description of a control, on the same screen you can set the tooltip text. Just one minor reason of many reasons to upgrade.

  • Get Current Mouse Position

    Is there a way to get the current mouse position on the screen? Unfortunately, I cannot use a listener to provide the mouse position, because I don't know what components (if any) that the mouse is over. I am trying to draw in the glass pane during a drag and drop. During a drag and drop, the glass pane does not get mouseEntered or mouseMoved events (which I would have used to get the ouse position if I could). So I was hoping for a static method that I could use within the glass pane's paint method to give me the current absolute position of the mouse.

    a time ago i used the glasspane and the mousemotionlistener works perfect. you only should be sure to show ( setVisible(true) ) your glasspane. the best way is to look onto the java tutorial how they did it.
    link: http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html
    tobais

  • Set dock to only show for some hotkey or if move mouse 5" below screen?

    It would be great if the dock would only show if I moved my mouse about 5 inches below the bottom of the screen. It is too easy to activate it.
    Is there a way to set it to do this, or disable it unless a certain hot key is pressed?

    Is there no way to do this?
    I've got two monitors. If I move it the the left of the screen, it is way over on my 2nd monitor and it still gets tripped when I don't want it to.
    I want to be able to disable it entirely (maybe open it with a hot key).
    Or, ideally, there must be a setting somewhere to set the vertical mouse position necessary to trigger the doc. That could be made well below my monitor, so that it would only trigger if I moved my mouse way outside of the normal range of motion.
    Thanks!

  • Easing a gotoAndStop(frame) given by the mouse position

    Hi there.
    I have an external swf loaded into the background and i want it to go to a frame according to the mouse vertical position.
    Example: when the mouse is on the bottom part of the screen the movie is in the frame 0 and when it is on the top value goes to 800.
    so far i did it like this:
    _root.onEnterFrame = function ()
{
         var frame:Number = Stage.height-_ymouse;
         bgContainer.gotoAndStop(frame);
         
}
    But somehow i need it to ease between the values given by the mouse position so that when there is a fast movement of the mouse, the swf only gradually goes to the frame equivalent to the last mouse position.
    any sugestions??
    Cheers!

    actualFrame ist not a number NaN so i can't use it to define a frame to the clip to stop..
    I just need a function that makes something like this:
    _ymouse           ---->            clip.gotoAndStop()
         1                  ---->                     1
         800              ---->                     16
         800              ---->                     26
         800              ---->                     67
         800              ---->                     135
         800              ---->                     233
         800              ---->                     358
         800              ---->                     498
         800              ---->                     571
         800              ---->                     704
         800              ---->                     731
         800              ---->                     800

  • Mouse position gets reset randomly from slide to slide

    Hi,
    I have a software demo that I'm working on (Captivate 5). From slide to slide, usually Captivate uses the start position of the mouse based on the end position of the mouse on the previous slide. But sometimes it seems to lose that position, and starts the mouse at the top left of the screen. Is there any way to change that starting position, or fix this little bug?
    Thanks,
    Joel

    I'm having a similar problem.  I've found that my mouse position changes to top left on all slides immediately following a FMR slide.  I've tried to manually reposition the mouse origin by drag-and-drop and right-click/align to..., but neither work.
    I've installed the 12/10 patch.
    Any suggestions?
    Thanks.

  • I have a mac mini and just purchased a moshi hdmi connector for my LED TV. The problem is, I wanted to be able to take my mouse from one screen to another, not just as a mirror image! Is it possible to do this some how?

    I have a mac mini and just purchased a moshi hdmi connector for my LED TV. The problem is, I wanted to be able to take my mouse from one screen to another, not just as a mirror image! Is it possible to do this some how?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    If you have two displays attached, then the function to change from mirrored to extended Desktop will appear in System Prefs/Displays.

  • Cursor position on screen data in module pool programming(urgent)

    Hi all,
    I developed a module pool  program which will save the data after  scanning the barcode data.
    In my program screen 100 is there which contains field  ‘2dbar’. scanned data is comming to 2dbar field.
    we r doing scan 4 times.once for vendor number,once for material no. like this.
    After 1st scan, vendor number will come to field ‘2dbar’.
    Then I developed logic to put comma after each scanned data come to this field ‘2dbar’.
    MODULE put_comma INPUT.
    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    *replace 2dbar with 2dbar2 into 2dbar.
    move 2dbar2 to 2dbar.
    *write 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    *move '' to 2dbar.
    *set cursor field 2dbar offset 5.
    *write
    ENDCASE.
    ENDMODULE.                 " put_comma  INPUT
    By above logic, comma  comes to the starting position of 2dbar after each scan. i.e cursor position is coming to the starting position of screen field ‘2dbar’.
    Now  I need to move the cursor position after the comma position on 2dbar after each scan.
    after 1st scan, 2dbar contains
    vmotorola
    then my logic puts a comma when u put enter on screen 100.
    now 2dbar contains
    vmotorola,
    i should get the cursor position after the comma.but i am getting cursor position before 'v'.so how to move this cursor position  beyond comma after each scan.
    I added set cursor  command but it is not working.plz
    What is the logic, I need to put in PAI  to move the cursor on selection screen.
    Already the logic I have mentioned.  with that logic, I can put comma.now I need to add cursor movement logic  to move the cursoron  on screen field ‘2dbar’.
    Plz reply me as it is urgent.
    Thanks in advance.
    Regards
    pabitra

    CASE OK_CODE.
    when ''.
    move 2dbar to 2dbar1.
    clear 2dbar.
    concatenate 2dbar1 ',' into 2dbar2.
    move 2dbar2 to 2dbar.
    condense 2dbar no-gaps.
    len = strlen ( 2dbar ).
    len = len - 1.
    set cursor field 2dbar offset len.
    ENDCASE.
    ENDMODULE. " put_comma INPUT

  • System not sensing mouse position

    Starting today, my computer (iMac G5 PPC) no longer senses the position of my mouse pointer. For instance:
    - The dock doesn't magnify when the mouse is in it
    - None of the corners activate things like screensaver, expose, desktop
    - When I select a menu in the menu bar, moving the mouse over another menu item doesn't open that menu.
    In other words, OSX simply has no clue where my mouse pointer is located as I move it for all those neat automatic things. Yet, I can still use the mouse to click on items to make them work, then OSX knows where the mouse is.
    I've rebooted several times to no effect, but did notice something. As apps start up, the instant a window opens, OSX will sense the mouse position for that brief moment. For example, putting the mouse over the dock doesn't magnify, but when an app window appears, the dock will magnify that very instance. Moving the mouse out of the dock area doesn't unmagnify the dock, it's stuck in that state until either another window opens, causing OSX to sense the new position, or I click any mouse button which all gets OSX's attention and senses the mouse position.
    The pointer never changes when I'm over things like Links.
    Strange stuff. The mouse moves fine, it's just not being detected as it moves.
    Now, yesterday I installed a new ScanSnap scanner with the ScanSnap Manager software and Acrobat Standard ver. 7. But the mouse didn't have this behavior yesterday, or even this morning. This strange problem just appeared out of the blue mid-day today.
    I've since used Disk Utility and Onyx, and re-installed the 10.4.9 update. I switched to another user account, no difference, so it's definitely system wide.
    This doesn't stop me from using my iMac, but I just don't know how to fix this mouse issue besides a OSX re-install.

    Ok everybody, I finally got proper behavior, it's just too bad I'm not sure of the procedure.
    When I go to bed I usually run the mouse pointer to the upper left corner to activate the screensaver. Of course it didn't work. But I also knew that clicking a button causes the mouse to be sensed, so I was pushing some of the buttons while in the corner to see if I could get the screensaver going.
    Well, after doing this, everything is back to normal operation again. So, I fixed it totally by accident. Makes me wonder if there's some features that are turned on and off somehow by doing whatever it was I did up in that corner.
    Just so you know, I use a Logitech Cordless Optical Trackman. I swapped to the original Apple corded mouse but that made no difference.
    I never had a chance to try the suggestions since I just read them before posting this.
    Anyway, I hope I don't do again whatever it was that caused the behavior, but I am going to store this info in DEVONthink just in case something like this happens again.
    Anyway, it would still be interesting if someone could shed some light on this fix I accidently found. Perhaps some hidden capabilities/features? Or just dumb luck?

  • MAC OS X + stage.fullScreenSourceRect + renderMode set to GPU = problem with mouse position

    When setting stage.fullScreenSourceRect, stage.displayState to StageDisplayState.FULL_SCREEN_INTERACTIVE; and renderMode to GPU, mouse position is read incorrectly. This is not only for mouseX and mouseY position, but also all the mouse interactions with Sprites, Buttons etc are not working correctly.
    Anybody know a solution for this issue?
    Here is the bug reported, but there is no response yet.
    https://bugbase.adobe.com/index.cfm?event=bug&id=3486120
    Greg.

    Bump up.
    Anybody has the same problem and have an idea how to fix it? Or please just check if you have the same problem.. I'm going to submit my game "Amelia and Terror of the Night" (successfully added to iOS store) to MAC App Store but can't do it while this problem appears.
    I am disappointed nobody  even verified the bugs I submitted at  the bugbase.adobe.com for AIR 3.5 and 3.6
    thanks
    Greg

  • Weird colors, mouse moves whole screen... what?

    my niece got on my mac and started hitting buttons. before i could stop her she did something that i've, so far, not been able to un-do. all of the colors are different, almost inverted-like. the icons seems a little bit bigger, and when i move my mouse, the whole screen shifts with it since everything is too big now to fit on my monitor. what did she do and how do i get it back to normal?

    Open the Universal Access pane of System Preferences, click on Seeing, and turn off both the Zoom and White on Black options.
    (28687)

  • Hwo to "track the mouse position"

    I m a java newbie, and need to write a small program to track the mouse position.
    basically, it opens a small window, and tell you the current mouse x, y coordinate. when mouse moves, hte x, y changes...
    by the way, how can i compile it to .exe file, after i finished coding.
    i try this way, but so many errors.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class mouseWin {
    public static void main(String[] args)
              protected int last_x=0, last_y=0;
              mouseMoved(MouseEvent e);
    JFrame frame = new JFrame("Mike's Mouse");
    JLabel X = new JLabel("x: " + last_x + "y: " + last_y);
    frame.getContentPane().add(X);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
         public mouseMoved(mouseEvent e)
              last_x = e.getx();
              last_y = e.gety();

    please help.
    i rewrite the code, but still cannot get it work
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.EventListener;
    public class mouseWin implements MouseMotionListener
    public static void main(String[] args)
                   int last_x;
                   int last_y;
                   last_x = 0;
                   last_y = 0;
                   JFrame frame = new JFrame("Mike's Mouse");
                   JLabel X = new JLabel("x: " + last_x + "y: " + last_y);
              frame.getContentPane().add(X);
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   frame.pack();
                   frame.setVisible(true);
         public void mouseMoved(MouseEvent e)
              last_x = e.getx();
              last_y = e.gety();
              JLabel X = new JLabel("x: " + last_x + "y: " + last_y);
    }

Maybe you are looking for

  • Visual Studio report with tabs (Worksheets in Excel) broken up by a specific field?

    I am fairly experience with SQL, but am somewhat new to using Microsoft Visual Studio. However, it is very similar to other SQL programs I have used a lot before. I have Visual Studio 2008. For my company, I use Visual Studio in creating BIDS reports

  • Help!! Acrobat 9 Pro Stopped Working

    I recentlly installed CS4. Was working a treat, then I got a virus on my comp and had to have it wiped clean and start again. Since re-installing Acrobat Pro 9, it doesn't work properly i.e. I can't insert pages, crop pages or delete pages etc can't

  • Thai Language dictation enable

    On my hand is iPhone5s 16GB and run on iOS. 8.1.3 I'm enable dictation 3 language English, Japanese and Thai. English and Japanese Dictation is very smooth But Thai Dictation is super slow to automatically typing after I talked. My native language is

  • High usage of MEMORYCLERK_SQLOPTIMIZER

    What is MEMORYCLERK_SQLOPTIMIZER? Under what situations, this clerk will use more memory? I have a server which is SQL Server 2012 and MEMORYCLERK_SQLOPTIMIZER is consuming almost half of the max memory configured.

  • ITunes 11 - a complete catastrophe!

    It's been 6 month since the release of iTunes 11 and I haven't managed yet to work with it. I hate it! What's wrong with iTunes 11? The sorting by Title, Album Interpret, Play Lists or Radio is confusing. Every page has its own Layout and I once I sw