Finding co ordinates, hit and edge of screen

1. I have created a rectangle called cerealBox. Is it possible to get some X,Y co odinates for cerealBox , so i can keep track of where is is on the screen. ?
2.What is hit usefull for , is it for detecting weather shapes have hit the edge of the screen or other shapes or both?
3.What is the best method of detecting weather a shape has gone past the edge of the screen?, are there facilities in java dedicated to this task, if so, please could you tell me what they are called.
Rectangle cerealBox = new Rectangle(0, 0, 5, 5);
g2.draw(cerealBox);

Let me get the silly answer out of the way: The first two parameters are the x,y coordinates of the rectangle. But, seriously, If you're asking for x,y in screen coordinates look at SwingUtilities class it has methods to deal with converting coordinate systems.
The hit method is basically what you describe. I haven't tried it for screen edge detection but you might be able to make it work.
You can brute force the off screen detection by getting screen size from Toolkit. You know the Rectangle's size and location so it shouldn't be too hard to figure out if any of the Rectange is off-screen.
Cheers
DB

Similar Messages

  • When I use Adobe Send the screen goes dark when I hit send but never seems to complete the send task! and recover the screen.F

    when I use Adobe Send the screen goes dark when I hit send but never seems to complete the send task! and recover the screen?F

    Hi frank at luray,
    Does this issue occur with any file that you try to send, or do you find that it's specific to one file? If it's a file-specific error, and the file is large, please try sending the file via Adobe SendNow. (You can sign in to Adobe SendNow at Sign in or create an account | Adobe SendNow using the same credentials you use to sign in to Adobe Send.)
    Please let us know how it goes.
    Best,
    Sara

  • Task bar has disappeared. can't find at edge of screen

    My task bar and the address bar at top of page have disappeared.  Can't find at edge of screen.  Unable to close program or go back.  The only time they are present is if I use the Task Manager.  Happened 2 days ago, was OK in PM, gone the next morning.  Has never happened before.  Suggestions?
    This question was solved.
    View Solution.

    Hi,
    Please try to restart Explorer:
    Open Task Manager (Ctrl+Alt+Del, click Start Task Manager)
    Click on the PROCESSES tab & and right click Explorer (in image col)
    Click "End Process"
    Click on FILE (upper left corner)
    Click on NEW TASK
    Type in "explorer"
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Hi. I have a 2008 macbook pro 15.4 inch. Not abused but the hinge is stiff and the lid/ screen is starting to de-laminate at the bottom edge. Any ideas on how to make the hinge work a little more freely and how to re-seal the screen to the lid?

    Hi. I have a 2008 macbook pro 15.4 inch. Not abused but the hinge is stiff and the lid/ screen is starting to de-laminate at the bottom edge. Any ideas on how to make the hinge work a little more freely and how to re-seal the screen to the lid?

    When you have kernel panics, the pertinent information is in the panic report.
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console 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 and start typing the name.
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ System Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar.
    There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of reports. A panic report has a name that begins with "Kernel" and ends in ".panic". Select the most recent one. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    If you don't see any reports listed, but you know there was a panic, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.

  • Why are some jpg images scrambled when they appear in my screen saver?   The same images look fine in Preview and Finder.  Some images appear scrambled in the screen saver 'preview' window and the actual screen saver. Other jpg images look fine.

    Why are some jpg images scrambled when they appear in my screen saver?   The same images look fine in Preview and Finder.  Some images appear scrambled in the screen saver 'preview' window and the actual screen saver. Other jpg images look fine.

    The desktop image is fine, taken from the exact same pool of jpg photos.  However, as soon as the slide show screen saver comes on, the images are scrambled.  What is it about the apple screen saver algorithm that scrambles the pics?

  • Hit something when editing presentation and now slides are all reduced in size and not filling screen.  Preferences, scale to fit doesn't work.  What did I do?

    Hit something when editing presentation and now slides are all reduced in size and not filling screen.  Preferences, scale to fit doesn't work.  What did I do?

    Please give complete details of your system and the media and the project properties.

  • Why won't my iMac print consistantly to my compatible HP 6500A? I've checked for updates and downloaded the lasted software...still can't print. All my other Mac devices find the printer but the iMac is hit and miss. I'm operating the Mac OS X Lion 10.7.

    Why won't my iMac print consistantly to my compatible HP 6500A? I've checked for updates and downloaded the lasted software...still can't print. All my other Mac devices find the printer but the iMac is hit and miss. I'm operating the Mac OS X Lion 10.7.

    When you say hit and miss do you mean sometimes you print a whole document with no problems, or do you mean each document has problems? This is from HP's website for your printer:
    Your sig says 10.6.7 but your message says 10.7. So if it's really Lion, this printer isn't officially supported. Elsewhere on HP's site it says updated drivers will be available on your Mac via Software Update. Have you run that recently?

  • How to find function module's and tables used for the particulat screen or TCODE?

    Hello Nation,
    I would like to know how to find the  function modules and tables used for the particular screen or TCODE or program.
    Example : I would like know the function module used in the program RDBGFT?
                     How can i find that?
    Thanks in advance ,Awaiting your reply.

    Make use of Find function  with the keyword "CALL FUNCTION".
    Make use of the same find function with the keyword "Select" to know the database tables used.
    Regards,
    Philip.

  • My screen is magnified on full and i can't find the menu bar and the doc.

    My screen is mangified on full and i can't find the menu bar and the dock.

    Hello, Melorw44.
    Try pressing the <esc> (Escape) key.
    If <esc> doesn't clear your full screen, restart your Mac.  When you launch Safari after the restart, the normal sized window should open.
    BTW, three finger double tap applies to trackpads. From your responses, I infer that you are not using a trackpad.  However, if you are using a wireless mouse (or other wireless pointing device), low batteries in the device might be causing your inability to control your view.
    Message was edited by: EZ Jim
    Mac OSX 10.8.2

  • When I turn on my iPad2, I can see the 'slide to unlock' button and my saved screen. However, on top is the "Not Enough Storage" information. It usually allows me to either hit "close" or "setting". However, it is totally locked.

    When I turn on my iPad2, I can see the 'slide to unlock' button and my saved screen. However, on top is the "Not Enough Storage" information. It usually allows me to either hit "close" or "setting". However, it is totally locked.
    I plugged my iPad into my computer to take off a lot of apps. Nothing changed. I am totally lost as to what to do...

    This can be a problem with the file [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    Delete [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.
    See:
    * http://kb.mozillazine.org/Session_Restore
    See also:
    * http://kb.mozillazine.org/Firefox_crashes
    * [[Firefox crashes]]

  • HT201365 Downloaded iOS7 on my 4S. Mostly went well, but sometimes screens lock up (especially text, but also Settings). Find I cannot access and send texts sometimes, plus do not receive some texts from others (group messages real problem).

    Downloaded iOS7 on my 4S. Mostly went well, but sometimes screens lock up (especially text, but also Settings). Find I cannot access and send texts sometimes, plus do not receive some texts from others (group messages real problem). Any work around? And related problem: Getting told can not connect to network when trying to sign on with Apple ID to launch Facetime and Messages.

    I've restarted several times. If I restore from backup, unfortunately the backup was done after iOS7 downloaded. Now, am I wrong that "restore as new" will essentially wipe me out? If so, and having backup, you're saying essentially start over and then backup?

  • How do I find previously downloaded files and documents?

    I've seen a page in the Finder which contains all my previuosly downloaded files - such as downloaded movie clips and jpegs. I can't find it again. How do I access this?

    1154/3600
    Hello again Stevie,
    Finding the path:
    Do not search for "Desktop" in Spotlight.
    Search for a mpeg or a jpg file name that you can remember, that you downloaded.
    Even part of the name should suffice to display a number of files. Now, to see the path, you can leave the mouse pointer on it a few seconds, until it appears on top in place of the pointer,
    or,
    you can choose the "Show All" Spotlight view, then trace the paths, informations etc from the window. (BTW you can also use this window to move files to another place.)
    From the Spotlight window, open the folder where your found file is.
    Better:
    open the upper folder in the path chain, the one that contains your folder.
    "Greyed":
    I don't understand where/how you can see them greyed, so tell me,
    is it that when doing your Spotlight search for "Desktop", you opened "Desktop & Screensaver" (as Top Hit) instead of "Desktop"?
    If that's the case, and if you can see the pictures you're looking for through System Preferences' "Desktop & Screensaver", then you can see the name of the folder where they are stored, in the left column.
    Do not pay attention to this if not, as the "Desktop route" won't lead anywhere if you cannot see the files icons all simply displayed on your screen.
    You already moved them somewhere else.
    --> Stick to the first "Finding the path" method,
    and post back the name (and path) of the folder where Spotlight locates them.
    Good luck!
    Axl

  • My iPod keeps showing the apple logo + a blank screen and the lock screen keeps freezing when trying to unlock it.

    Last night I turned my iPod touch 4g off randomly and then when I went to turn it back on and went to unlock the screen it froze up right there and will not unlock to the home screen to where all my apps and all that are. Ever since that happened the iPod keeps showing the apple logo repeatedly, as well as a screen being completely blank when still turned on. Also when i plug in the iPod to the computer it recognizes it for a second but the iPod does nothing and shuts off and repeats in showing the apple logo and blank black screen. I can get it to the home screen where the slide to lock button is but every time i even attempt to slide it, it freezes up and doesn't do it.
    I also having been trying to restore it by plugging in the cord and pressing the home button to get the screen with the usb cord to pop up but no matter what i do, it will not let me turn the iPod off period because every time i keep trying to do that it just shows the apple logo and all of what i said up above again. I have also seen it get a white screen to show a few times , which i assume means the white screen of death. I have never seen that screen before this happened.
    I know this is not making any sense whatsoever but this is very hard to put into words in explaining. I have searched the internet but i can't find a single problem that sounds like this one in solving to fix it. The iPod is on right now as i'm typing this. I haven't attemtped to push the buttons down again to fix as i would assume maybe to just leave it alone as i sleep through the night in hopes of it maybe working or even dying. I've only had this iPod for 4 months now and i just don't understand why it won't let me turn it off completely or work properly for me to restore it.

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • Pages crashes when opening any document on iPad 3 Latest version.   I could find on the net and finally deleted Pages from my device and reinstalled it. Still when I try to create anew document or open a document it just cr

    Pages crashes when opening any document on iPad 3 Latest version. I tried everything I could find on the net and finally deleted Pages from my device and reinstalled it. Still when I try to create a new document or open a document it just crashes out.

    Try this:
    Make sure IOS is updated to latest version
    Reboot device by pressing both the home button and sleep/wake (power) buttons at the same time for 10-15 seconds until the apple logo appears on the screen, then let go.
    If that doesn't work then reset the device by going to settings/general/reset/reset all settings

  • Mail app is blank. I can not see any thing but a blank page with blue lined format. It does not shut down either. It just blinks out after a few seconds and the icon is there alone on my home screen then everything goes black and my home screen comes

    MY Mail app does not respond in anyway to anything. The icon shows I have over 300 emails but I have no access to them. When I tap on the Mail icon a blank white page comes up with the blue format lines. No emails, no inbox, nothing, not a single letter of the alphabet is there. Within a few seconds it blinks out and I see the icon and my home screen. Soon it just blinks out to black. I am left with the icon at the bottom center of the screen. I have no way to shut it down. I have no access to the emails (300) in my inbox. All that is happening is my memory is getting filled up with emails. I would appreciate any solution to this problem barring deleting my email set up in settings.
    if I have to resort to that I will, in the meantime I am hoping for a different resolution. Thanks everyone, you are all amazing and greatly appreciated. Sincerely, Diane.

    Hey There Diane,
    If I'm understanding your situation, you've got an iPad running iOS 6.1.3 and the Mail app is not working.  I understand you don't want to remove and re-add your email account.  
    The first thing I would suggest is to make sure your iPad is backed up to iCloud or iTunes.
    Do you have an iMAP or a POP email account?  When you go online to your email service provider's website, are you able to access the 300 emails in your inbox?
    Since the Mail app is part of your iOS operating system, upgrading that software to the latest version, which is 8.1.3 may resolve this issue.  
    If an app you installed unexpectedly quits, stops responding, or won’t open - Apple Support
    http://support.apple.com/en-us/HT201398
    Try these steps if you have an unresponsive app on your iPhone, iPad, or iPod touch.
    Restart the app
    Close the app and open it again.Restart your device
    Turn your device off and back on.Check for iOS and app updates
    Make sure that you're using latest version of iOS.
    Open the App Store and tap Updates.
    If updates are available, tap Update All.
    If asked, enter your Apple ID password. 
    You might need a Wi-Fi connection to update some apps.
    Update the iOS software on your iPhone, iPad, and iPod touch - Apple Support
    http://support.apple.com/en-us/HT204204
    Update the iOS software on your iPhone, iPad, and iPod touch
    Learn how to update your iOS device wirelessly or using iTunes.
    iOS software updates introduce new features that let you do even more with your iPhone, iPad, or iPod touch. Be sure to keep your devices up to date so that you don't miss out on the latest features.Before you update
    Back up your device to iCloud or iTunes.
    If you use your device's Personal Hotspot for your computer's Internet connection, update your device wirelessly or connect your computer to another network.Update your device wirelessly
    The easiest way to update your device is wirelessly, also called “over the air.” Here’s how:
    Plug in your device to a power source.
    Tap Settings > General > Software Update.
    Tap Download and Install. Updates might download automatically while your device is connected to Wi-Fi and a power source.
    Tap Install, or tap Later to install the update later. If you use a passcode, you'll need to enter it before installing the update.
    If you have some free space, but not enough to update over the air, you can either update using iTunes or delete content manually from your device. Whether you use iTunes or update over the air, you'll have the same amount of free space on your device after you update.
    Some iOS software updates aren't available as over-the-air updates. VPN or proxy connections might prevent your device from contacting the iOS update servers.Update your device using iTunes
    If you can’t update wirelessly, or if you want to update with iTunes, follow these steps:
    Install the latest version of iTunes on your computer.
    Plug in your device to your computer.
    In iTunes, select your device.
    In the Summary pane, click Check for Update. 
    Click Download and Update.
    If you don't have enough free space to update using iTunes, you'll need to delete content manually from your device.
    Find out what to do if you get other error messages while updating your device.
    Last Modified: Jan 12, 2015
    Hope this helps ...
    - Judy

Maybe you are looking for