Point loc = ws.getComponentLocation(); if (loc != null) { x = (int) loc.getX(); y = (int) loc.getY(); }
    public void showPanel() {        createPanel();        prefixTextField.setText(DefaultLayerName);        int x = 10;        int y = 10;        WindowSupport ws = getWindowSupport();        Point loc = ws.getComponentLocation();        if (loc != null) {            x = (int) loc.getX();            y = (int) loc.getY();        }        MapHandler mh = (MapHandler) getBeanContext();        Frame frame = null;        if (mh != null) {            frame = (Frame) mh.get(java.awt.Frame.class);        }        ws.displayInWindow(frame, x, y, -1, -1);    }