How would I draw a shape in an applet and have the border one color with the fill a different color?

I figured this one out on my own. Thought I'd post the code in case someone searches something to this effect up in the future. Just have to put the line color first, then the fill color.

//square with a black border and red fill
        g.setColor(Color.black);
        g.drawRect(15, 15, 50, 50);
        g.setColor(Color.red);
        g.fillRect(16, 16, 49, 49);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.