getIcon(null), // null by default, according to MS ux guidlines
instruction,
text);
dlg.setCommands( StandardCommand.CANCEL );
final CommandLinkButtonGroup bGroup = new CommandLinkButtonGroup();
final List<ButtonModel> models = new ArrayList<ButtonModel>();
final List<CommandLinkButton> buttons = new ArrayList<CommandLinkButton>();
CommandLinkButton btn;
JPanel p = new JPanel( new MigLayout(""));
p.setOpaque(false);
for( CommandLink link: choices ) {
btn = new CommandLinkButton(link, TaskDialog.getDesign().getCommandLinkPainter() );
models.add( btn.getModel());
buttons.add( btn );
bGroup.add(btn);
p.add( btn, "dock north, gapbottom 8");
}
if ( defaultChoice >= 0 && defaultChoice < choices.size()) {
bGroup.setSelected(models.get(defaultChoice), true);
// make sure that selected button is focused
p.addAncestorListener( new AncestorAdapter() {
@Override