window.pack();
window.setFocusableWindowState(false);
    public JWindowPopup(Component owner, Component contents,                        int x, int y)    {      /* Checks whether contents is null. */      super(owner, contents, x, y);      window = new JWindow();      window.getRootPane().add(contents);      window.setLocation(x, y);      window.pack();    }