provide consistent api for panels and dialogs