Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TaskDialog dlg = new TaskDialog("Security Warning");
- dlg.setInstruction( "The publisher cannot be verified.\nDo you want to run this software?" );
- dlg.setText( "Name: C:\\Program Files\\eclipse\\eclipse.exe\n" +
- "Publisher: <b>Unknown Publisher</b>\n" +
- "Type: Application\n");
- dlg.setIcon( TaskDialog.StandardIcon.WARNING );
- dlg.getFooter().setCheckBoxText("Always ask before opening this file");
- dlg.setCommands( StandardCommand.OK.derive("Run"), StandardCommand.CANCEL );
- if ( dlg.show().equals(StandardCommand.OK)) {
- //do something
- }
Add Comment
Please, Sign In to add comment