/** Resets the <code>Popup</code> to an initial state. */ void reset(Component owner, Component contents, int ownerX, int ownerY) { super.reset(owner, contents, ownerX, ownerY); Component component = getComponent(); component.setLocation(ownerX, ownerY); rootPane.getContentPane().add(contents, BorderLayout.CENTER); contents.invalidate(); component.validate(); pack(); }
/** Resets the <code>Popup</code> to an initial state. */ void reset(Component owner, Component contents, int ownerX, int ownerY) { super.reset(owner, contents, ownerX, ownerY); JComponent component = (JComponent) getComponent(); component.setOpaque(contents.isOpaque()); component.setLocation(ownerX, ownerY); component.add(contents, BorderLayout.CENTER); contents.invalidate(); pack(); }