question: private static int showUrlsPrompt ( Component parent , List < String > urls ) { String text = "<html><body style='width: 100px;'>" ; for ( String url : urls ) { url = splitUrl ( url ) ; text += url + "<br />" ; } String okOption = "Open URL" ; if ( urls . size ( ) > 1 ) { okOption = "Open " + urls . size ( ) + " URLs" ; } String [ ] options = { okOption , "Cancel" } ; if ( urls . size ( ) == 1 ) { options = new String [ ] { okOption , "Copy URL" , "Cancel" } ; } int chosenOption = JOptionPane . showOptionDialog ( parent , text , "Open in default browser?" , JOptionPane . OK_CANCEL_OPTION , JOptionPane . QUESTION_MESSAGE , null , options , 1 ) ; return chosenOption ; }
target:  Actually show the dialog that contain the given URLs and give the user the option to open the URL, copy it or cancel the dialog.