@Override
	public void paintComponent(Graphics g) {
		super.paintComponent(g);  // paint background
//		setBackground(Color.BLACK);
		world.setUnit(player);
		String report = "";
		String victims = "";
		for(AUnit u:player.getVictimList()){
			victims = victims + " <br> " + u.getUnitName() + " was sunk !!! by " + player.getUnitName();
		}
//		victims = "<html>" + victims +"</html>";
		for(Report r:player.getReports()){
			report = report + " <br> " + r.getRangeReport() + " : " + r.getDirectionReport();
		}
//		report = "<html>" + report +"</html>";
		String text = "<html>" + victims + "<br><br>" + report +"</html>";
		reportLabel.setText(text);
		Dimension size = reportLabel.getPreferredSize();
		reportLabel.setBounds(10, 350,
	             size.width, size.height);
		
		speedSlider.setMaximum((int)(player.getConfiguration().getMaxSpeedMs()/conversionFromKnotsToMs));
		
		if(player.getType()==TYPE.DESTROER){

			bombDepthLabel.setVisible(true);
			bombDepthSlider.setVisible(true);

		}else if(player.getType()==TYPE.SUBMARINE){
			
			depthLabel.setVisible(true);
			depthSlider.setVisible(true);
			depthSlider.setValue(player.getCoordinates().getCoordinateH());
			
		}
		
		{
			int num = 0;
			
			
			Enumeration<AbstractButton> jREnum = targetGroup.getElements();
			
			while(jREnum.hasMoreElements()){
				remove(jREnum.nextElement());
			}			
			
			for(AUnit u:player.getVisibleTargets()){
				if(!u.isDestroyed()){
					final JRadioButton button = new JRadioButton( u.getType().getDescription() + " : Position on " + (int)player.getPositionByTargetID(u.getUnitId()).getAnglePosition() + " : Distance : " + (int)player.getPositionByTargetID(u.getUnitId()).getDistance() + " meters");
					button.setToolTipText(Long.toString(u.getUnitId()));
					add(button);
					targetGroup.add(button);
					button.setVisible(true);
					Dimension sizeButton = button.getPreferredSize();
					if(num==0){
						button.setSelected(true);
						player.setUnderAttack(Game.getInstance().getUnitByID(u.getUnitId()));
					}
					button.setBounds(380, 100+num * 50,
							sizeButton.width, sizeButton.height);
					button.addActionListener(new ActionListener() {
		                @Override
		                public void actionPerformed(ActionEvent e) {
		                	System.out.println(((JRadioButton)e.getSource()).getToolTipText());
		                	player.setUnderAttack(Game.getInstance().getUnitByID(Long.valueOf(((JRadioButton)e.getSource()).getToolTipText())));
		                }
		            });
				num++;
				}
			}
			

		}

	}