protected void setComponents() {
		getContentPane().setLayout(new BorderLayout());
		JPanel generalPanel = new JPanel();
		generalPanel.setLayout(new GridBagLayout());
		GridBagConstraints gridBagConstraints = new GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 0;
		gridBagConstraints.anchor = GridBagConstraints.WEST;
		gridBagConstraints.weightx = 1.0;
		generalPanel.add(new JLabel(Messages.getString("T_SEGMENTS"),SwingConstants.CENTER), gridBagConstraints); //$NON-NLS-1$
		gridBagConstraints.gridx = 1;
		gridBagConstraints.gridy = 0;
		segmentsLabel = new JLabel(Integer.toString(genesList.size() * symmetry));
		generalPanel.add(segmentsLabel, gridBagConstraints);
		gridBagConstraints.gridx = 2;
		gridBagConstraints.gridy = 0;
		generalPanel.add(new JLabel(Messages.getString("T_ENERGY_TO_REPRODUCE"),SwingConstants.CENTER), gridBagConstraints); //$NON-NLS-1$
		gridBagConstraints.gridx = 3;
		gridBagConstraints.gridy = 0;
		energyLabel = new JLabel(Integer.toString(energy));
		generalPanel.add(energyLabel, gridBagConstraints);
		gridBagConstraints.gridx = 4;
		gridBagConstraints.gridy = 0;
		generalPanel.add(new JLabel(Messages.getString("T_LIFE_EXPECTANCY"),SwingConstants.CENTER), gridBagConstraints); //$NON-NLS-1$
		gridBagConstraints.gridx = 5;
		gridBagConstraints.gridy = 0;
		JLabel life = new JLabel(Integer.toString(Utils.MAX_AGE));
		generalPanel.add(life, gridBagConstraints);
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 1;
		generalPanel.add(new JLabel(Messages.getString("T_SYMMETRY"),SwingConstants.CENTER), gridBagConstraints); //$NON-NLS-1$
		gridBagConstraints.gridx = 1;
		gridBagConstraints.gridy = 1;
		String[] symmetryValues = {"1","2","3","4","5","6","7","8"};  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
		symmetryCombo = new JComboBox(symmetryValues);
		symmetryCombo.setSelectedItem(Integer.toString(symmetry));
		symmetryCombo.addItemListener(new ItemListener() {
			
			@Override
			public void itemStateChanged(ItemEvent evt) {
				if (evt.getStateChange() == ItemEvent.SELECTED) {
					symmetry = Integer.parseInt((String)symmetryCombo.getSelectedItem());
					energy = 40 + 3 * symmetry * genesList.size();
					energyLabel.setText(Integer.toString(energy));
					segmentsLabel.setText(Integer.toString(genesList.size() * symmetry));
					drawPanel.repaint();
				}
			}
		});
		generalPanel.add(symmetryCombo, gridBagConstraints);
		gridBagConstraints.gridx = 2;
		gridBagConstraints.gridy = 1;
		generalPanel.add(new JLabel(Messages.getString("T_MIRROR"),SwingConstants.CENTER), gridBagConstraints); //$NON-NLS-1$
		gridBagConstraints.gridx = 3;
		gridBagConstraints.gridy = 1;
		String[] noyesValues = {Messages.getString("T_NO"), Messages.getString("T_YES")}; //$NON-NLS-1$ //$NON-NLS-2$
		mirrorCombo = new JComboBox(noyesValues);
		mirrorCombo.setSelectedIndex(mirror);
		mirrorCombo.addItemListener(new ItemListener() {
			
			@Override
			public void itemStateChanged(ItemEvent evt) {
				if (evt.getStateChange() == ItemEvent.SELECTED) {
					mirror = mirrorCombo.getSelectedIndex();
					drawPanel.repaint();
				}
			}
		});
		generalPanel.add(mirrorCombo, gridBagConstraints);
		gridBagConstraints.gridx = 4;
		gridBagConstraints.gridy = 1;
		generalPanel.add(new JLabel(Messages.getString("T_DISPERSE_CHILDREN"),SwingConstants.CENTER), gridBagConstraints); //$NON-NLS-1$
		gridBagConstraints.gridx = 5;
		gridBagConstraints.gridy = 1;
		disperseCombo = new JComboBox(noyesValues);
		disperseCombo.setSelectedIndex(disperseChildren==false?0:1);
		disperseCombo.addItemListener(new ItemListener() {
			
			@Override
			public void itemStateChanged(ItemEvent evt) {
				if (evt.getStateChange() == ItemEvent.SELECTED)
					disperseChildren = disperseCombo.getSelectedIndex()==0? false: true; 
			}
		});
		generalPanel.add(disperseCombo, gridBagConstraints);
		
		getContentPane().add(generalPanel,BorderLayout.NORTH);
		genesPanel = new JPanel();
		genesScroll = new JScrollPane(genesPanel);
		genesScroll.setPreferredSize(new Dimension(440,300));
		refreshGenesPanel();
		getContentPane().add(genesScroll,BorderLayout.WEST);
		
		drawPanel = new JPanel() {
			private static final long serialVersionUID = 1L;
			@Override
			public void paintComponent (Graphics g) {
				super.paintComponent(g);
		        draw(g);
		    }
		};
		drawPanel.setPreferredSize(new Dimension(200,200));
		drawPanel.setBackground(Color.BLACK);
		getContentPane().add(drawPanel,BorderLayout.CENTER);
		
		JPanel buttonsPanel = new JPanel();
		okButton = new JButton(Messages.getString("T_COPY_TO_CLIPBOARD")); //$NON-NLS-1$

		buttonsPanel.add(okButton);
		cancelButton = new JButton(Messages.getString("T_CANCEL")); //$NON-NLS-1$
		buttonsPanel.add(cancelButton);
		JButton clearButton = new JButton(Messages.getString("T_CLEAR")); //$NON-NLS-1$
		clearButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent evt) {
				genesList.clear();
				refreshGenesPanel();
			}
		});
		buttonsPanel.add(clearButton);
		
		JButton importButton = new JButton(Messages.getString("T_IMPORT")); //$NON_NLS-1$
		importButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				GeneticCode g;
	    		try {
	    			JFileChooser chooser = mainWindow.getGeneticCodeChooser();
	    			chooser.setFileFilter(new BioFileFilter(BioFileFilter.GENETIC_CODE_EXTENSION));
	    			int returnVal = chooser.showOpenDialog(null);
	    			if (returnVal == JFileChooser.APPROVE_OPTION) {
	    				try {
	    					// Read XML code from file
	    					BioXMLParser parser = new BioXMLParser();
							g = parser.parseGeneticCode(chooser.getSelectedFile());
							genesList.clear();
							importGeneticCode(g);
							refreshGenesPanel();
	    				} catch (SAXException ex) {
	    					System.err.println(ex.getMessage());
	    					JOptionPane.showMessageDialog(null,Messages.getString("T_WRONG_FILE_VERSION"),Messages.getString("T_READ_ERROR"),JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$
	    				} catch (IOException ex) {
	    					System.err.println(ex.getMessage());
	    					JOptionPane.showMessageDialog(null,Messages.getString("T_CANT_READ_FILE"),Messages.getString("T_READ_ERROR"),JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$
						}
	    			}
	    		} catch (SecurityException ex) {
					System.err.println(ex.getMessage());
					JOptionPane.showMessageDialog(null,Messages.getString("T_PERMISSION_DENIED"),Messages.getString("T_PERMISSION_DENIED"),JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$
				}
			}
		});
		buttonsPanel.add(importButton);
		
		final JButton exportButton = new JButton(Messages.getString("T_EXPORT"));
		exportButton.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent ae) {
				mainWindow.saveObjectAs(new GeneticCode(genesList, symmetry, mirror, disperseChildren));
			}
		});
		buttonsPanel.add(exportButton);
		
		getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
		
		getRootPane().setDefaultButton(okButton);
	}