final Point screen = new Point(location); final Component parent = component.getParent(); if (parent != null) { final Point parentScreen = parent.getLocationOnScreen(); screen.translate(parentScreen.x, parentScreen.y); } return screen; }
return computeLocationOnScreen(component); }
    public Point getLocationOnScreen() {        final Point screen = new Point(location);        final Component parent = component.getParent();        if (parent != null) {            final Point parentScreen = parent.getLocationOnScreen();            screen.translate(parentScreen.x, parentScreen.y);        }        return screen;    }