   [java] Screen coordinates of an applet?
  Hi EveryoneI've been working on a game that uses the mouse to control movement.  Without going into too much detail, it moves based on how far the mouse is from the center of the window, then moves the mouse back to the center.  I am using the mouseMove() method in the class Robot to keep re-centering the mouse.  Since mouseMove() uses screen coordinates rather than relative to the frame, I've been simply finding the frame's current position on the screen and adding half of the window size.The problem came when I tried to set the game up to run as an applet.  As far as I know, Applet and JApplet have no methods for finding their current position on the screen, as getX() and getY() both return 0 no matter where the browser is moved to.So what I'm wondering is, is there any way that you know of to find the screen coordinates of the applet or am I going to have to find another way to do this? Thanks-Droopy   
  Why cant you just useContainer c = getContentPane();c.getX();c.getY();This will get the x and y of the applet frame.If does not do what you need, please explain in a bit more detail.   ;  Thanks for the response jjhavokk and sorry for the vague nature of my post...The problem I had with your suggestion is that this is being called from a JPanel that has a reference to the main frame, a Container (so that either a JFrame or a JApplet could use the panel without needing to change it), and the getContentPane() method is higher up than the Container level.  However, since posting I discovered that there is a getLocationOnScreen() method (>.<) which pretty much cleared everything up for me.Thanks again   