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);
Table t = new Table(1, 2); t.setStyleAttribute("border-style:solid;border-color:#e1e1e1;border-width:1px;"); t.setHeight(Table.HUNDRED_PERCENT); t.setVerticalAlignment(1, 1, Table.VERTICAL_ALIGN_TOP); t.setVerticalAlignment(1, 2, Table.VERTICAL_ALIGN_BOTTOM);  Table table = new Table(); table.setCellpadding(0); table.setCellspacing(0); table.setWidth(Table.HUNDRED_PERCENT); int row = 1;  Collection runners = (Collection) iwc.getSessionAttribute(Registration.SESSION_ATTRIBUTE_PARTICIPANTS); double amount = ((Double) iwc.getSessionAttribute(Registration.SESSION_ATTRIBUTE_AMOUNT)).doubleValue(); String cardNumber = (String) iwc.getSessionAttribute(Registration.SESSION_ATTRIBUTE_CARD_NUMBER); IWTimestamp stamp = (IWTimestamp) iwc.getSessionAttribute(Registration.SESSION_ATTRIBUTE_PAYMENT_DATE);  table.add(getHeader(iwrb.getLocalizedString("run_reg.hello_participant", "Hello participant(s)")), 1, row++); table.setHeight(row++, 16);  table.add(getText(iwrb.getLocalizedString("run_reg.payment received", "We have received payment for the following:")), 1, row++); table.setHeight(row++, 8);  Table runnerTable = new Table(5, runners.size() + 1); runnerTable.setWidth(Table.HUNDRED_PERCENT); runnerTable.add(getHeader(iwrb.getLocalizedString("run_reg.runner_name", "Runner name")), 1, 1); runnerTable.add(getHeader(iwrb.getLocalizedString("run_reg.run", "Run")), 2, 1); runnerTable.add(getHeader(iwrb.getLocalizedString("run_reg.distance", "Distance")), 3, 1); runnerTable.add(getHeader(iwrb.getLocalizedString("run_reg.race_number", "Race number")), 4, 1); runnerTable.add(getHeader(iwrb.getLocalizedString("run_reg.shirt_size", "Shirt size")), 5, 1); table.add(runnerTable, 1, row++); int runRow = 2;  Iterator iter = runners.iterator(); while (iter.hasNext()) { Participant participant = (Participant) iter.next(); Group run = participant.getRunTypeGroup(); Group distance = participant.getRunDistanceGroup();  runnerTable.add(getText(participant.getUser().getName()), 1, runRow); runnerTable.add(getText(iwrb.getLocalizedString(run.getName(), run.getName())), 2, runRow); runnerTable.add(getText(iwrb.getLocalizedString(distance.getName(), distance.getName())), 3, runRow); runnerTable.add(getText(String.valueOf(participant.getParticipantNumber())), 4, runRow); runnerTable.add(getText(iwrb.getLocalizedString("shirt_size." + participant.getTShirtSize(), participant.getTShirtSize())), 5, runRow++);
	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);	}