You can download the whole project, AdfBitsComponent.zip or, if you want to just use the component library (as shown in the screen shot above), download just the jar AdfBitsComponentLib.jar.
- Will ensure that no values are left over from the last time it was displayed (has been a major issue with our project).
- Has Save and Cancel buttons built in that call declared actions/actionListeners.
- Has optional confirmation prompt when using the cancel button (it will check to see if any of the editable values have changed, and if so will prompt the user to confirm, yes/no, that they want to cancel their edits).
- Will also capture the x, close-icon, and perform the Cancel button's actionListener, in case anything needs to be cleaned up once the popup is dismissed.
- Will click the Save button when the Enter key is pressed.
- Will click the Cancel button when the Escape key is pressed.
- If the Confirmation prompt is up, then pressing Enter will cause the current yes/no button to click.
- If the Confirmation prompt is up, then pressing Escape will cause the Confimration prompt to dismiss, but will allow the main popup to remain.
- All labels are customizable, but come with defaults set.
- Includes a facet to allow more buttons to be added between the Save and Cancel buttons.
If these features don't match your requirements (or if they don't work like you think they should), download the project and hack away at it.