Fondo.java
1
2
3
4
5
6
7 import java.awt.Color;
8 import java.awt.Graphics;
9
10
11 public class Fondo extends ObjetoGrafico{
12 public Fondo (int x, int y, int a, int d){
13 super(x, y, a, d);
14 }
15 public void paint (Graphics g){
16 if (visible){
17 g.setColor(new Color(50, 170, 2));
18 g.fillRect(getPosX() + (int)(getAncho() * 0), getPosY() + (int)(getAlto() * 0), (int)(getAncho() * 1), (int)(getAlto() * 1));
19 g.setColor(Color.orange);
20 g.fillOval(getPosX() + (int)(getAncho() * 0.05), getPosY() + (int)(getAlto() * 0.15), (int)(getAncho() * 0.875), (int)(getAlto() * 0.666));
21 }
22 }
23 }
CategoryProgramacion