Here\'s the function which draws a shape at the given coordinates:
public void drawTank(int x,int y){
int h = 50;
int w = 50;
graphic.setColor(Col
Here's the brute-force way to do it. Take a look at Java.lang.Math and java.awt.Graphics (which you already have an instance of) With this you can use the draw polygon function to compute the points of your rectangle, which you can do using the sin and cos functions in Java.lang.Math
Really, you'd only need to compute two points this way, as your starting point would be the 90degree vertex from which you would calculate the two adjoining coordinates with. From there it's just a matter of doing some addition and subtraction with the points that you have and your dimension values to get the last point kitty-corner to your starting point.
I'd figure it out for you, and write some example code, but then what fun would that leave you?