import java.awt.*; public class DrawingIlum { private DopIlum il = DopIlum.Ten; public void setIl(int num){ switch(num) { case 0: il = DopIlum.Twenty; break; case 1: il = DopIlum.Thirty; break; default: break; } } private Color color; public DrawingIlum(int num, Color color) { setIl(num); this.color = color; } public void DrawIl(int startPosX, int startPosY, Graphics2D g) { g.setColor(Color.blue); for (int tempX = 98; tempX > 38; tempX -= 6) { g.fillOval((int) startPosX + tempX, (int) startPosY + 20, 4, 4); } switch (il) { case Twenty: { for (int tempX = 98; tempX > 38; tempX -= 6) { g.fillOval((int) startPosX + tempX, (int) startPosY + 26, 4, 4); } break; } case Thirty: { for (int tempX = 98; tempX > 38; tempX -= 6) { g.fillOval((int) startPosX + tempX, (int) startPosY + 25, 4, 4); g.fillOval((int) startPosX + tempX, (int) startPosY + 30, 4, 4); } break; } default: break; } } }