private static JFrame getFrame(Object point) { int x; int y; if (point instanceof Point) { x = ((Point) point).x; y = ((Point) point).y; } else { if (SX.isVersion1()) { x = ((Region) point).getCenter().x; y = ((Region) point).getCenter().y; } else { x = ((Element) point).getCenter().x; y = ((Element) point).getCenter().y; } } JFrame anchor = new JFrame(); anchor.setAlwaysOnTop(true); anchor.setUndecorated(true); anchor.setSize(1, 1); anchor.setLocation(x, y); anchor.setVisible(true); return anchor; }