The LibreOffice Java MessageBox Class simplifies generation of a com.sun.star.awt.XMessageBox with a custom title and message, a selected icon (determined by MessageBoxType), and selected response buttons.
The selections are made using the same values as for XMessageBox. Return values are identical to those of XMessageBox excepting addition of an error return value.