Hello, how do I get the actual screen position of an element, say a Button? If I use getBounds I get the position relative to the parent container, not the screen...
+2
A:
You can try this:
// Convert a coordinate relative to a component's bounds to screen coordinates
Point pt = new Point(component.getLocation());
SwingUtilities.convertPointToScreen(pt, component);
Bobby
2010-02-03 13:51:23
perfect. sorry I was in a hurry and I didn't notice it. Tnx
gotch4
2010-02-03 14:00:46