question about drawing with out java2D
<p>I have another question, this is also extra credit and not homework. This time I need to create a border with out using java2d. The instructions are...
Write a method called drawRectangleBorder having six parameters which does not use the graphics package. It draws a rectangular border starting at the x and y coordinates given as the first two parameters, having a width and height given by the third and fourth parameters, the width of the border given by the fifth parameter in the color given by the sixth parameter. The parameter list is: x, y, width, height, borderWidth, color</p>

<p>I used a previous method I made to create a border around the outside of a picture but the best I can make it do now is a couple scattered boxes. The most recent version will not show anything</p>

<pre><code>public void drawRectangleBorder(
        int x, int y, int width, int height, int border, Color newColor) {
    int startX = 0;
    int startY = 0;

    // top and bottom  
    for (startX = x; x &lt; width; x++) {
        for (startY = y; y &lt; border; y++) {
            // top pixel
            this.getPixel(startX, startY).setColor(newColor);
            // bottom pixel
            this.getPixel(startX + width, startY + height).setColor(newColor);
        } // for-y
    } // for-x

    // left and right  
    for (startX = x; x &lt; border; x++) {
        for (startY = y; y &lt; height; y++) {
            // left pixel
            this.getPixel(startX, startY).setColor(newColor);
            // right pixel
            this.getPixel(startX + width, StartY + height).setColor(newColor);
        } // for-y
    } // for-x

    return;
} // end drawRectangleBorder
</code></pre>

<p>Again I thank you for any input.</p>
