Search code examples
javagraphicsacm-java-libraries

ACM Polygon No Border?


I'm a newbie to Java!!! :)

Right now, I'm just perplexed about the ACM library's objects and it's functions. I want to create a GRect with a color of green. So I would probably do this:

GRect rect = new GRect(0, 0, 50, 50);
rect.setFilledColor(Color.GREEN);
rect.setFilled(true);
add(rect);

But my problem here is how to get rid of the border of the GRect. I already checked the documentation, but no luck. Is there some secret thing to do this, or is this even possible?

If you need anything, please comment.


Solution

  • Thanks to BevynQ to solving my problem. The rect.setColor() method sets the border to that color, allowing you to "eliminate" the border.