Keeping the mouse pointer in a frame

Hi all,
I am making an application in which I want the mouse cursor to "stay" in the frame.
Let me explain, typically, if the user points the mouse outside of the frame and clicks, the focus of the mouse will move away from the java application. However, in my situation, I want the mouse events to be "stuck" on the application, even if the user clicks outside of the application. The focus can be lost if the user hits escape or some key.
I have seen this done before in some java games: for example the windowed setting of the game titan attack by puppy games does this (http://www.puppygames.net/titan-attacks).
Any ideas?
-Adam

Use a full screen application.
Personally, I don't think any application should take control of your mouse if you attempt to move it away from your application. I'm in control of the desktop, not your application.

Similar Messages

  • Is there a way to keep the mouse pointer in my window

    I would like to change the cursor so that it can not go outside my application window until they exit the program. Is this possible?

    Just because you disagree with its usage does not make
    it an invalid question. Suppose you had an
    application dedicated to real-time monitoring of a
    high-pressure system. In our hypothetical example,
    accessing other parts of the system without first
    properly "dismissing" the application could be
    potentially hazardous - people could get hurt. In
    this case, would it not make sense to make the
    application "system-modal"? Furthermore, it would be
    a convenience to the operator if the mouse pointer
    were trapped in this critical application.
    How would one go about trapping the mouse cursor
    inside this application?Yes, it would make sense to make this application system-modal. And it would also make sense to not allow any other applications to run on the monitoring system. For such an application, then, it would occupy the entire screen and there would be no way to swap away from it to any other application. Which is what several people suggested for this rather non-critical application, I believe.
    But in the ordinary case, where you are running on a system that does allow multiple applications to run, trapping the mouse cursor in a single application is bad manners and an alternate solution should be sought.

  • Safari 5 keeps hiding the mouse pointer...

    Safari 5 keeps hiding the mouse pointer.
    Have to click continuously in the Finder to restore it...very annoying.
    Somebody help...?

    HI Rafael,
    From the Safari Menu Bar click Safari/Empty Cache.
    Relaunch Safari.
    Carolyn

  • Trackpad keeps "bouncing" the mouse pointer when I tap to select (MacBook Pro, 15" Retina, 2014)

    Hi, I got a brand new 15" MacBook Pro a week or so back and had problems with the trackpad - when I tap to select an item the mouse pointer "bounces" off the item I'm trying to select. It happens randomly - not every time. Very irritating. Supplier got me a replacement machine, and it's doing the same thing! Is anyone else experiencing this issue? I migrated all my data and settings from my old Mac Pro (2011 model, also running Mavericks) via Time Machine - could that have an impact? Not using any non-Apple power supplies or other devices. Any input would be welcomed.

    TrevorBurroughs wrote:
    Hi, I got a brand new 15" MacBook Pro a week or so back and had problems with the trackpad - when I tap to select an item the mouse pointer "bounces" off the item I'm trying to select. It happens randomly - not every time. Very irritating. Supplier got me a replacement machine, and it's doing the same thing! Is anyone else experiencing this issue? I migrated all my data and settings from my old Mac Pro (2011 model, also running Mavericks) via Time Machine - could that have an impact? Not using any non-Apple power supplies or other devices. Any input would be welcomed.
    Migrating user from one machine to another should not be a cause of your symptoms.
    Curious two machines in a row. Did this happen before you transferred data/ or di you check.
    You have 14 days to return/exchange if you are not satisfied.
    You could Try resetting NVRAM/PRAM http://support.apple.com/kb/ht1379   but I don't see it.
    Did you try making adjustments to trackpad settings
    >Sys Pref>Trackpad> Point & Click>speed

  • How can i change the mouse pointer image?

    Hi friends!!
    It's possible to change the mouse pointer image in Swing?
    Thanks a lot.

    There's a setCursor() method on the frame component.

  • After updated software on mac mini with os x 10.7.5 and restart the mouse pointer after about 30 sec. converted to the rainbow wheel and I can't control the computer.

    After updated software on mac mini with os x 10.7.5 and restart the mouse pointer after about 30 sec. converted to the rainbow wheel and I can't control the computer. The rainbow wheel was runnig 8 hrs and I turn off mac mini by power button, then I turn on mac mini with key Shift and p/w, checked HD. My HD has
    capacity 499.25 GB used 86.91GB. Is there a solution to fix this problem axcept the reinstall os?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac.  
    These steps are to be taken while booted in safe mode.
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below to select it:
    for k in /Sy*/L*/Ex*/{,.?}*.kext; do test -f "$k/Contents/Info.plist" && /usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$_" | egrep -qv "apple|Accusys|ArcMSR|ATTO|CalDigit|HighPoint|hp-fax|JMicron|print|SoftRAID|stex" && echo $k; done | open -f -a TextEdit
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    sudo defaults read com.apple.loginwindow LoginHook | open -f -a TextEdit 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3 
    Repeat with this line:
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 4
    osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null | open -f -a TextEdit 
    Remember, Steps 1-4 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • Adjust the 'aim' of the mouse pointer

    Hello,
    Back in the days of Tiger I used a little haxie called Might Mouse from Unsanity. This allowed me to tweak the click point of the mouse cursor. By default the click point of the mac's cursor is a few pixels within the cursor image itself.
    Call me crazy, but I feel the 'aim' of the mouse cursor should be the very tip of the mouse. If you're unsure of what I'm talking about, click and drag on an empty space on the desktop. You should be creating a selection square. If you're dragging down and to the right, the bottom right corner of the square will line up with upper left of the mouse cursor. Now notice where the selection box meets the mouse. It's not exactly at the tip of the mouse, but a few pixels behind the tip.
    When you magnify the mouse cursor, this issue is magnified as well. With the upgrade to leopard most Unsanity apps are broken... And for all intents and purposes dead.
    Does anyone know of an app that lets you adjust the click point or 'aim' of the mouse pointer? I thought I'd eventually just get used to it, buts it's driving me crazy!
    Thanks.

    Pinpoint- Used to create animations around the mouse, and maybe custom cursors. But I'm ignorant of how to use quartz composer to make my own cursor to use in the app.
    MoundoMouse- Used to resize and move windows with mouse movements (w/o actually clicking the window) ...Might keep this one for the ‘window focus follows mouse’, reminded me of the old UNIX box I worked on for a few years. The mouse focus can be very handy.
    SteerMouse- Used to add more control to unsupported mouses and extra control over tracking/acceleration and cursor snapping to buttons. ...Might keep this one. Hopefully I can turn down the horizontal scrolling speed of the scrollball... always seems way to fast. Not sure as it needs a restart, and I'm converting vids...
    *...Sadly, none of these seem to have the feature I was talking about. Please let me know if I missed something.*
    However, thank you for your response!

  • Centering the mouse pointer at the center of a icon

    Hi all,
    I have an Icon on a dailog box, and when i drag the icon i want to set the mouse pointer at the center of the icon. The mouse pointer get sets to Icon Frame's leftside. i want it excatly at the center. Can plz any one help to solve this problem.
    Thanx in advance

    There is a when-mouse-over trigger and that works fine in client-server mode for Forms 5/6/6i, but that is less indicated when deployed using Application Server.
    In that trigger you may write whatever code is necessary, restricted package procedures.
    Still, I think, for your case, if you do not have to deal with a multi-record block, you should use the HINT property for that item and set_item_property with the HINT argument for that item in order to set the hint to the item's value - this should set_item_property should be called on the when-new-record-instance .

  • When a link is rolled over by the mouse pointer a very annoying pop up with the link address shows up. There seems to be no way to prevent this from happening. How can this pop up be made to go away?

    no matter what website, every time I move the mouse pointer over something to click on a line of black printing in a thin white box pops up at the bottom of the screen and shows me the http address of the item I'm about to click on. I want to shut this function off or remove it if possible. I find that the previous version did not do this, it seems to be unique to 6.0. It's VERY distracting and ANNOYING. How can I make it go away????

    When you hover the mouse cursor over any link, it will display the link details at the bottom left of the screen; black font on white background.
    This display can be very important as it shows the full address of the hyperlink. This can be particulary useful for checking on whether the link is bona-fida. For example; if you receive an email that looks like it is from a bank , hovering over the link will indicate instantly that the link is pretending to be something it isn't.
    Another example that can be useful; a website link may say 'contact me' rather than give the actual email address. However, when you hover over the link, the actual email address will be displayed at the bottom of the screen. If you click on the link then Outlook usually opens, however I do not use Outlook, so displaying the email address is useful.
    This display is something that has always been present and it is also displayed if you use IE.
    However, I can see that this annoys you, so you could try the following:
    [[https://addons.mozilla.org/en-US/firefox/addon/link-location-bar/?src=api]]
    After installing the addon, you will need to restart Firefox, then go to History and Restore previous session to get all your tabs and webpages back.
    You will now find that when you hover over any link, it will now display in your address bar on the right hand side.
    If this helps, please say this question has been solved.

  • How can I delete the video and keep the Audio  in a few frames using Imovie 11

    How can I delete the video and keep the Audio  in a few frames using Imovie 11?

    I've met the problem too before. but i solved it with  Audio Converter Mac instead of iMovie. If you have similar situation that just want to keep audio but not video, and if your file format is not workable in iMovie, you can use the Audio Converter for help too. it can easily help to extract audio soundtrack from any video format. Or if you need to convert one audio format to another, it is a good choice too, because it supports many common audio output formats.
    <Link Edited By Host>

  • External display won't show the mouse pointer (optical)

    hi all,
    13" display dimming my old eyes . decided to connect to 20" sony monitor. got the adapter > connected> display shows identical to laptop BUT no mouse pointer AND when the external monitor is displaying, the menubar is not longer existent on the powerbook (the trackpad does work on the laptop screen with external connected ) so I cannot get to the display preferences to set anything up to get the mouse pointer to show on the external monitor.
    HELP and thanks
    sue

    ok folks, fiddled since I wrote this and managed to actually get it going ! so all set.
    I'm up and running with the display. and all is dandy !
    Message was edited by: Sue brown1

  • Is there a way to obtain the text item's value when the mouse pointer at?

    Hi,
    Is there a way to obtain the text item's value when the mouse pointer at? Mouse pointer may be located somewhere out of current record and even out of current block.

    There is a when-mouse-over trigger and that works fine in client-server mode for Forms 5/6/6i, but that is less indicated when deployed using Application Server.
    In that trigger you may write whatever code is necessary, restricted package procedures.
    Still, I think, for your case, if you do not have to deal with a multi-record block, you should use the HINT property for that item and set_item_property with the HINT argument for that item in order to set the hint to the item's value - this should set_item_property should be called on the when-new-record-instance .

  • Why the mouse pointer in Logic Pro does not change shape during work in OSX 10.9.1?

    I've a MacBook Pro Retina 15-inch Late 2013 and I'm using two external displays. One connected to to the HDMI port (display 1) the other to thunderbolt (display 2). The MacBook display is closed. I’m working with Logic Pro 9.1.8 (32bit) with OSX 10.9.1
    Why the mouse pointer in Logic Pro does not change shape during work???
    It was already difficult with OSX 10.9 but now after upgrading to 10.9.1 it's game over!
    At least before I could select which display use Logic Pro to have all the shape functions of the pointer. Not in both displays, so to be forced to edit in ONLY ONE of the two displays using this workaround: (right click on Logic icon in Dock: Option --> Desktop on Display 1). Now or I select “Option --> All Desktops” or does not work. However, by selecting all displays you say goodbye to Mission Control. This can’t be a solution!!!
    The amazing thing is that Nuendo has no problem while Logic Pro, Apple's native software, it can't!
    With Nuendo it’s indifferent in which display you are working, the shape of the mouse pointer changes shape depending on the requirement in both displays.
    This thing drives me crazy!
    Solutions?
    Here some ideas in other foums:
    http://www.logicprohelp.com/forum/viewtopic.php?f=1&t=86264
    But this aren't really solutions but workarounds. Use Logic in all desktops makes Mission Control useless!!

    I installed all over again by formatting as suggested by the genes of pro application support. Each plug-in, each virtual instrument, a job that lasted 3 days. And as suggested for each new plug-in I proceeded to check the proper functioning of Logic Pro and did each time a back up with Time Machine.
    The Result:
    Logic works as it should ONLY on the primary monitor and ONLY on the first desktop.
    BUT
    Reason and Nuendo dont' have this issue !!
    I believe that Apple developers are thinking only to mobile phones and things like messages or face time.
    And that's not all!
    After a few weeks, perhaps by installing a version of Adobe Acrobat, I say maybe because I'm not sure, logic has stopped working properly. Again problems with the mouse pointer.
    Luckily I had a back up! But now I'm terrified to install new programs. Thanks Apple!

  • Just got a new macbook air and every time I close the cover and then reopen it later the mouse pointer freezes. I've just updated the operating system but no help Seems like it might be a software problem with mousepad. Its only 3 weeks new !

    I purchased a Macbook Air on 01st October and from day 3 every time I close the cover and reopen it later the mouse pointer is frozen
    I updated the operating system today but no change.
    Any one else having this annoying problem. Seems like a software glitch to me.

    http://www.microsoft.com/mac/support
    http://answers.microsoft.com/en-us/mac/forum/macword?auth=1
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/microsoft-wor d-for-mac-2011-will-not-open-error/ecc42616-6f49-40bb-b8f5-e21c711ea359

  • The answer helped me.But still, what are the settings that I have to change for the behavior of the mouse pointer towards finder? Also the mouse pointer sometimes  doesn't accept my command and start clicking itself.what is the problem and how to fix it?

    The answer helped me.But still, what are the settings that I have to change for the behavior of the mouse pointer towards finder? Also the mouse pointer sometimes  doesn't accept my command and start clicking itself.what is the problem and how to fix it?

    If the mouse clicks something on its own then it looks like you have a hardware problem with the trackpad or possibly the battery that is right underneath the trackpad.
    I have read that the battery can swell and that would put pressure on the trackpad.

Maybe you are looking for

  • BT Fon connection on Ubuntu

    I am trying to connect with BT Fon on Ubuntu 12.4. I can connect to other wireless connections listed in Network connections, and my own using my key. But the BT Fon appears to connect but my browser says serve not found. I have looked at endless Goo

  • Adblock web filtering for ios7

    I am looking to purchase a Iphone again ( I went away at iphone 4 from lack of choice of controls) I would like to start thinking and addressing the reasons I left apple. and one reason and it was a big one for me was the lack of filtering controls.

  • IPhone 5s (new) has terrible reception, 5 PICS included. -115 db reading!?!

    I just got an iPhone 5s. FIRST THING I noticed when I was getting ready to walk out the Verizon store - my iPhone 5s was reading "3 bars of 3G service"  inside the Verzon store. What!? Every other device in the store has bull 5 FULL bars of LTE servi

  • Need to change query on hgrid at runtime

    Hi, I have created a page with hgrid, that shows quote lines with cost. Since cost is not stored in quoting tables, I've joined cost tables in the VO qurey and in AMImpl, added where condition to the VO for organization_id (since cost can be defined

  • Problem with implement BI_cont_ TX

    Hi all; After I add Bi-cont 5.0 om my bi installation. I treid to implement Bi_cont ext on SAINT as add-on. But I get this massages: caution upgrade or prepare is still running import not permitted I did run report RSUPGRES on client 000 by DDIC user