@Override
	public void paint(Graphics g) {
		super.paintComponent(g);    // Paint background
  
		// Draw the box
		g.setColor(Color.BLACK);
		g.fillRect(0, 0, BOX_WIDTH, BOX_HEIGHT);
  
		// Draw the planets
		this.solarSystem.Draw(this,g);
		double loss = this.solarSystem.kineticEnergy + this.solarSystem.potentialEnergy - this.solarSystem.originalEnergy;
		top_loss = Math.max(top_loss,loss);
		bot_loss = Math.min(bot_loss,loss);
		// Display the information line
		g.setColor(Color.WHITE);
		g.setFont(new Font("Courier New", Font.PLAIN, 12));
		StringBuilder sb = new StringBuilder();
		Formatter formatter = new Formatter(sb);
		formatter.format("**JUST PRESS A KEY ** %s: o %d :gain(%6.0f->%6.0f)%6.0f:k %6.0f:p %6.0f:l %d",
                                gravity.getClass().getName(),
				this.solarSystem.numberOfPlanets,
				bot_loss,
				top_loss,
				loss,
				this.solarSystem.kineticEnergy,
				this.solarSystem.potentialEnergy,
				this.loop_counter++
				 );
		g.drawString(sb.toString(), 0, 12);
		formatter.close();
   }