public DeleteActivityWindow() {
		setTitle("Eliminar actividad");

		this.activityService = ActivityService.getInstance();

		setResizable(false);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 344, 109);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);

		List<Activity> listActivities = activityService.getActivities();
		JComboBox comboBox = new JComboBox();
		for (Activity a : listActivities) {
			comboBox.addItem(a.getName());
		}

		JButton btnDelete = new JButton("Borrar");

		JButton btnAccept = new JButton("Aceptar");
		GroupLayout gl_contentPane = new GroupLayout(contentPane);
		gl_contentPane.setHorizontalGroup(
			gl_contentPane.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, gl_contentPane.createSequentialGroup()
					.addContainerGap()
					.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.RELATED, 82, Short.MAX_VALUE)
					.addComponent(btnDelete)
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addComponent(btnAccept)
					.addGap(28))
		);
		gl_contentPane.setVerticalGroup(
			gl_contentPane.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPane.createSequentialGroup()
					.addGap(27)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
						.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnDelete)
						.addComponent(btnAccept))
					.addContainerGap(31, Short.MAX_VALUE))
		);

		btnDelete.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Activity activity = null;
				try {
					activity = activityService.findByName(comboBox
							.getSelectedItem().toString());
					if (activity.getStudents().isEmpty()) {
						activityService.remove(activity);
						DeleteActivityWindow thisWindow = (DeleteActivityWindow) ((JButton) e
								.getSource()).getTopLevelAncestor();
						thisWindow.setVisible(false);
						thisWindow.dispose();
					} else {
						String message = "No se puede eliminar la actividad, posee "
								+ activity.getStudents().size()
								+ " matriculados\n";
						JOptionPane.showMessageDialog(new JFrame(), message,
								"ERROR", JOptionPane.ERROR_MESSAGE);
					}
				} catch (InstanceNotFoundException e1) {
					e1.printStackTrace();
				}
			}
		});

		btnAccept.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				DeleteActivityWindow thisWindow = (DeleteActivityWindow) ((JButton) e
						.getSource()).getTopLevelAncestor();
				thisWindow.setVisible(false);
				thisWindow.dispose();
			}
		});

		contentPane.setLayout(gl_contentPane);
	}