This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Is there a way in java to find out what pixel is behind a specific pot on my frame (or JFrame)? Whether that's the desktop, an icon or another frame/window? If not, is there a way to do this on Linux/Windows in c/c++?
Look at SwingUtilities methods: public static void convertPointToScreen(Point p, Component c) Convert a point from a component's coordinate system to screen coordinates. Parameters: p - a Point object (converted to the new coordinate system) c - a Component object public static Component getDeepestComponentAt(Component parent, int x, int y) Returns the deepest visible descendent Component of parent that contains the location x, y. If parent does not contain the specified location, then null is returned. If parent is not a container, or none of parent's visible descendents contain the specified location, parent is returned. Parameters: parent - the root component to begin the search x - the x target location y - the y target location
though this would not locate a OS widget behind a Java frame. [ January 29, 2004: Message edited by: Jose Botella ]
If what you are trying to do is make an odd-shaped (i.e. non-rectangular) frame, there is no way to do that using just Java. You *can* use a package called SkinLF that supports non-rectangular frame (and many, many other goodies), but the non-rectangular stuff only works on Windows.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
subject: Is there a way to find out color of whatever's behind my frame?