public void actionPerformed(ActionEvent e) {

			np.cleanUp();

			// set the root, entity splitting, nary relation order
			rootString = choice.getRootCombo().getSelectedItem().toString();

			for (int i = 0; i < splitThis.size(); i++) {
				r.setEntityToBeSplitted(splitThis.get(i));
			}

			for (int i = 0; i < cycles.size(); i++) {
				List<String> s = cycles.get(i);
				if (!s.get(0).equals("0") && s.contains(rootString)) {
					for (int j = 0; j < s.size(); j++) {
						if (!s.get(j).equals(rootString)) {
							r.setEntityToBeSplitted(s.get(j));
						}
					}
				}
			}

			try {
				r.translateToORASS();
			} catch (MainException me) {
				JOptionPane.showMessageDialog(choice, me.getMessage(), "ERROR",
						JOptionPane.ERROR_MESSAGE);
			}

			nary = r.getNaryRels();

			if (nary.size() != 0) {
				// go to NaryPanel
				naryPanelExist = true;
				for (Map.Entry<String, List<String>> entry : nary.entrySet()) {
					String relName = entry.getKey();
					List<String> listOrder = entry.getValue();
					Pair<JButton, JLabel> n = np.addChoicePanel(relName,
							listOrder);
					JButton b = n.getFirst();
					mapButtonRelationName.put(b, relName);
					mapButtonLabel.put(b, n.getSecond());
					mapButtonNary.put(b, listOrder);

					b.addMouseListener(new MouseAdapter() {

						@Override
						public void mouseReleased(MouseEvent e) {
							if (MouseEvent.BUTTON1 == e.getButton()) {
								JButton btemp = (JButton) e.getSource();
								Pair<JPanel, ArrayList<JComboBox>> pane;
								if (mapButtonCombo.containsKey(btemp)) {
									pane = mapButtonCombo.get(btemp);
								} else {
									pane = np.getOptionPane(mapButtonNary
											.get(btemp));
									mapButtonCombo.put(btemp, pane);
								}

								boolean check = true;
								while (check) {
									int result = JOptionPane.showConfirmDialog(
											null, pane.getFirst(),
											"Specify the order",
											JOptionPane.OK_CANCEL_OPTION);
									if (result == JOptionPane.CANCEL_OPTION) {
										check = false;
									} else {
										if (result == JOptionPane.OK_OPTION) {
											// check if the choices are
											// different
											List<String> newOrder = new ArrayList<String>();
											List<JComboBox> temp2 = pane
													.getSecond();
											for (int i = 0; i < temp2.size(); i++) {
												String s = temp2.get(i)
														.getSelectedItem()
														.toString();
												newOrder.add(s);
											}
											HashSet<String> hashSet = new HashSet<String>();
											check = false;
											for (String s : newOrder) {
												if (hashSet.contains(s))
													check = true; // contains
																	// duplicates
												else
													hashSet.add(s);
											}
											if (check) {
												JOptionPane.showMessageDialog(
														pane.getFirst(),
														"Duplicate(s) detected! Choose the correct order!",
														"ERROR",
														JOptionPane.ERROR_MESSAGE);
											} else {
												JLabel l = mapButtonLabel
														.get(btemp);
												l.setText(""); // remove the
																// current text
												for (int i = 0; i < newOrder
														.size(); i++) {
													l.setText(l.getText()
															+ newOrder.get(i)
															+ " ");
												}
												mapButtonNary.put(btemp,
														newOrder);
												String reltemp = mapButtonRelationName
														.get(btemp);
												nary.put(reltemp, newOrder);
											}
										}
									}
								}
							}
						}
					});

				}
				np.addNextCancelButton();
				main.getMainFrame().setContentPane(choice.getNaryPane());
				main.getMainFrame().validate();
			} else {
				// go to TranslatePanel
				try {
				Map<String, ErdNode> rootMap = r.getERDEntityTypes();
				r.buildORASS(rootMap.get(rootString));
				naryPanelExist = false;
				translate.emptiedField();
				main.getMainFrame().setContentPane(choice.getTranslatePane());
				main.getMainFrame().validate();
				} catch (MainException me) {
					System.out.println(me.getMessage());
				}
			}
		}