aboup pop-up panel!

I want to create a pop-up panel that appears when a button is clicked. This panel is different from regular panels — it has no tabs, cannot be docked, and it automatically closes when clicking outside of it (i.e., when clicking elsewhere in the application window).
Currently, I'm facing the following issues:
What type of panel is this?
What panel type should I use to dynamically create such a panel?How do I position the panel on the screen after creation?
For example, I want it to appear next to the button that triggered it.How can I make the panel automatically close when clicking outside of it?
What mechanism is used to detect this and close the panel?
If anyone has experience with this, please kindly share your insights. Thank you very much!
