public static MessageDialogButton showMessageDialog ( WindowBasedTextGUI textGUI , String title , String text , MessageDialogButton ... buttons ) { MessageDialogBuilder builder = new MessageDialogBuilder ( ) . setTitle ( title ) . setText ( text ) ; if ( buttons . length == 0 ) { builder . addButton ( MessageDialogButton . OK ) ; } for ( MessageDialogButton button : buttons ) { builder . addButton ( button ) ; } return builder . build ( ) . showDialog ( textGUI ) ; }
Shortcut for quickly displaying a message box