@@ -0,0 +1,1286 @@
+import java.awt.Color;%0Aimport java.awt.Graphics;%0A%0Aimport javax.swing.JLabel;%0A%0Apublic class basicDraw %7B%0A%09public void draw(JLabel label,int%5B%5D x,int%5B%5D y, int nn, Color c)  //draw a polygon%0A%09%7B%0A%09%09Graphics g = label.getGraphics();%0A%09    g.setColor(c);%0A%09    g.drawPolygon(x,y,nn);%0A%09    g.dispose(); %0A%09%7D%0A%09%0A%09public void filleddraw(JLabel label,int%5B%5D x,int%5B%5D y, int nn, Color c)  //draw a filled polygon%0A%09%7B%0A%09%09Graphics g = label.getGraphics();%0A%09    g.setColor(c);%0A%09    g.fillPolygon(x,y,nn);%0A%09    g.dispose(); %0A%09%7D%0A%09%0A%09public void draw(JLabel label,int x,int y, int r, Color c)  //draw a circle%0A%09%7B%0A%09%09Graphics g = label.getGraphics();%0A%09    g.setColor(c);%0A%09    g.drawOval(x,y,r,r);%0A%09    g.dispose(); %0A%09%7D%0A%09%0A%09public Color getColor(int flag)%0A%09%7B%0A%09%09Color c = Color.black;%0A%09%09switch(flag)%0A%09%09%7B%0A%09%09%09case 0:%0A%09%09%09%09c = Color.blue;%0A%09%09%09%09break;%0A%09%09%09case 1:%0A%09%09%09%09c = Color.cyan;%0A%09%09%09%09break;%0A%09%09%09case 2:%0A%09%09%09%09c = Color.green;%0A%09%09%09%09break;%0A%09%09%09case 3:%0A%09%09%09%09c = Color.yellow;%0A%09%09%09%09break;%0A%09%09%09case 4:%0A%09%09%09%09c = Color.white;%0A%09%09%09%09break;%0A%09%09%09case 5:%0A%09%09%09%09c = Color.orange;%0A%09%09%09%09break;%0A%09%09%09case 6:%0A%09%09%09%09c = Color.pink;%0A%09%09%09%09break;%0A%09%09%7D%0A%09%09return c;%0A%09%7D%0A%09public int checkAS(String%5B%5D ass, String as)%0A%09%7B%0A%09%09int position = 0;%0A%09%09%0A%09%09for(int i = 0; i %3C 7; i++)%0A%09%09%7B%0A%09%09%09position = i;%0A%09%09%09if(ass%5Bi%5D.equals(as))%0A%09%09%09%7B%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return position;%0A%09%7D%0A%09%0A%7D%0A

add a basic draw function