JRootPane rootPane = SwingUtilities.getRootPane(owner); JLayeredPane layeredPane = rootPane.getLayeredPane(); this.layeredPane = layeredPane;
    public LightweightPopup(Component owner, Component  contents, int x, int y)    {      super(owner, contents, x, y);      this.owner = owner;      this.contents = contents;      this.x = x;      this.y = y;    }