catch (RemoteException re) { log(re); } catch (FinderException fe) { log(fe); } t.add(TextFormatter.formatText(message), 1, 1); t.add(new PrintButton(iwrb.getLocalizedString("print","Print")));
Table creditCardTable = new Table(2, 3); creditCardTable.add(getHeader(iwrb.getLocalizedString("run_reg.payment_received_timestamp", "Payment received") + ":"), 1, 1); creditCardTable.add(getText(stamp.getLocaleDateAndTime(iwc.getCurrentLocale(), IWTimestamp.SHORT, IWTimestamp.SHORT)), 2, 1); creditCardTable.add(getHeader(iwrb.getLocalizedString("run_reg.card_number", "Card number") + ":"), 1, 2); creditCardTable.add(getText(cardNumber), 2, 2); creditCardTable.add(getHeader(iwrb.getLocalizedString("run_reg.amount", "Amount") + ":"), 1, 3); creditCardTable.add(getText(formatAmount(iwc.getCurrentLocale(), (float) amount)), 2, 3); table.setHeight(row++, 16); table.add(creditCardTable, 1, row++);  table.setHeight(row++, 16); table.add(getHeader(iwrb.getLocalizedString("run_reg.delivery_of_race_material_headline", "Race material and T-shirt/sweatshirt")), 1, row++); table.add(getText(iwrb.getLocalizedString("run_reg.delivery_of_race_material_body", "Participants can collect their race number and the t-shirt/sweatshirt here.")), 1, row++);  table.setHeight(row++, 16); table.add(getHeader(iwrb.getLocalizedString("run_reg.receipt_info_headline", "Receipt  PRINT IT OUT")), 1, row++); table.add(getText(iwrb.getLocalizedString("run_reg.receipt_info_headline_body", "This document is your receipt, please print this out and bring it with you when you get your race number and T-shirt/sweatshirt.")), 1, row++);  table.setHeight(row++, 16); table.add(getText(iwrb.getLocalizedString("run_reg.best_regards", "Best regards,")), 1, row++); table.add(getText(iwrb.getLocalizedString("run_reg.reykjavik_marathon", "Reykjavik Marathon")), 1, row++); table.add(getText("www.marathon.is"), 1, row++);  table.setHeight(row++, 16); t.add(table, 1, 1);  PrintButton print = new PrintButton(iwrb.getLocalizedString("print", "Print")); t.add(print, 1, 2);
	public void main(IWContext iwc) throws Exception {		super.setResizable(true);		super.setHeight(450);		IWResourceBundle iwrb = getResourceBundle(iwc);		String name = iwc.getParameter(IWMarathonConstants.PARAMETER_NAME);		String run = iwc.getParameter(IWMarathonConstants.GROUP_TYPE_RUN);		String distance = iwc.getParameter(IWMarathonConstants.GROUP_TYPE_RUN_DISTANCE);		String tshirt = iwc.getParameter(IWMarathonConstants.PARAMETER_TSHIRT);		Table t = new Table();		t.setStyleAttribute("border-style:solid;border-color:#e1e1e1;height:19px;border-width:1px;padding-left:6px;");		String message = iwrb.getLocalizedString("registration_received", "Your registration has been received.");		Group runGroup = null;		Group distanceGroup = null;		try {			runGroup = getGroupBusiness(iwc).getGroupByGroupID(Integer.parseInt(run));			distanceGroup = getGroupBusiness(iwc).getGroupByGroupID(Integer.parseInt(distance));			Object[] args = { name, iwrb.getLocalizedString(runGroup.getName(),runGroup.getName()), iwrb.getLocalizedString(distanceGroup.getName(),distanceGroup.getName()), iwrb.getLocalizedString(tshirt, tshirt) };			message = MessageFormat.format(iwrb.getLocalizedString("registration_received", "Your registration has been received."), args);		}		catch (RemoteException re) {			log(re);		}		catch (FinderException fe) {			log(fe);		}		t.add(TextFormatter.formatText(message), 1, 1);		t.add(new PrintButton(iwrb.getLocalizedString("print","Print")));				add(t);	}