File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Getting the Location of an Applet Component Relative to the Browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Getting the Location of an Applet Component Relative to the Browser" Watch "Getting the Location of an Applet Component Relative to the Browser" New topic
Author

Getting the Location of an Applet Component Relative to the Browser

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
I have defined my own custom Components running inside an Applet. I want to find their location relative to the browser window. Component.getLocation() returns the location relative to the parent only. Is there anyway to find the location relative to the browser window? Looks like I have to recursively calls getLocation() for all the parents until reaching the Applet. Are there any other alternatives?
 
 
subject: Getting the Location of an Applet Component Relative to the Browser