SwingUtilities: convertPointFromScreen(Point p, Component c)
import java.awt.Point;
import javax.swing.JButton;
import javax.swing.SwingUtilities;
public class Main {
public static void main(String[] argv) {
JButton component = new JButton();
Point pt = new Point(component.getLocation());
SwingUtilities.convertPointFromScreen(pt, component);
}
}
Related examples in the same category