@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed"
	// <editor-fold defaultstate="collapsed"
	// desc="Generated Code">//GEN-BEGIN:initComponents
	private void initComponents() {

		titreLabel = new javax.swing.JLabel();
		nombreLabel = new javax.swing.JLabel();
		nombreSpinner = new javax.swing.JSpinner();
		entreeLabel = new javax.swing.JLabel();
		entreeComboBox = new javax.swing.JComboBox();
		sortieLabel = new javax.swing.JLabel();
		sortieComboBox = new javax.swing.JComboBox();
		ajouterButton = new javax.swing.JButton();
		jSeparator1 = new javax.swing.JSeparator();

		titreLabel.setText("Ajouter des voitures");

		nombreLabel.setText("Nombre :");

		nombreSpinner.setModel(new javax.swing.SpinnerNumberModel(1, 1, 100, 1));
		nombreSpinner.setToolTipText("Nombre de voitures à ajouter.");

		entreeLabel.setText("Entrée :");

		entreeComboBox.setModel(new javax.swing.DefaultComboBoxModel(VoieEnum
				.values()));
		entreeComboBox.setSelectedItem(VoieEnum.ALEAT);
		entreeComboBox.setToolTipText("Voie d'entrée des voitures ajoutées.");

		sortieLabel.setText("Sortie :");

		sortieComboBox.setModel(new javax.swing.DefaultComboBoxModel(VoieEnum
				.values()));
		sortieComboBox.setSelectedItem(VoieEnum.ALEAT);
		sortieComboBox.setToolTipText("Voie de sortie des voitures ajoutées.");

		ajouterButton.setText("Ajouter");
		ajouterButton.setToolTipText("Ajouter les voitures.");
		ajouterButton.addActionListener(new java.awt.event.ActionListener() {
			@Override
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				if (listener != null) {
					listener.actionPerformed(evt,
							(Integer) nombreSpinner.getValue(),
							(VoieEnum) entreeComboBox.getSelectedItem(),
							(VoieEnum) sortieComboBox.getSelectedItem());
				}
				ajouterButtonActionPerformed(evt);
			}
		});

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
		this.setLayout(layout);
		layout.setHorizontalGroup(layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addComponent(ajouterButton, javax.swing.GroupLayout.DEFAULT_SIZE,
						javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
				.addGroup(
						layout.createSequentialGroup()
								.addGap(12, 12, 12)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addComponent(nombreLabel)
												.addComponent(entreeLabel)
												.addComponent(sortieLabel))
								.addPreferredGap(
										javax.swing.LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addComponent(
														sortieComboBox,
														0,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														Short.MAX_VALUE)
												.addComponent(nombreSpinner)
												.addComponent(
														entreeComboBox,
														0,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														Short.MAX_VALUE)))
				.addComponent(titreLabel).addComponent(jSeparator1));
		layout.setVerticalGroup(layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						layout.createSequentialGroup()
								.addComponent(titreLabel)
								.addPreferredGap(
										javax.swing.LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.BASELINE)
												.addComponent(nombreLabel)
												.addComponent(
														nombreSpinner,
														javax.swing.GroupLayout.PREFERRED_SIZE,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														javax.swing.GroupLayout.PREFERRED_SIZE))
								.addPreferredGap(
										javax.swing.LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.BASELINE)
												.addComponent(entreeLabel)
												.addComponent(
														entreeComboBox,
														javax.swing.GroupLayout.PREFERRED_SIZE,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														javax.swing.GroupLayout.PREFERRED_SIZE))
								.addPreferredGap(
										javax.swing.LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.TRAILING)
												.addComponent(sortieLabel)
												.addComponent(
														sortieComboBox,
														javax.swing.GroupLayout.PREFERRED_SIZE,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														javax.swing.GroupLayout.PREFERRED_SIZE))
								.addPreferredGap(
										javax.swing.LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(ajouterButton)
								.addPreferredGap(
										javax.swing.LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(jSeparator1,
										javax.swing.GroupLayout.PREFERRED_SIZE, 10,
										javax.swing.GroupLayout.PREFERRED_SIZE)));
	}// </editor-fold>//GEN-END:initComponents