Jump to content

Draw opaque rectangle


Recommended Posts

Posted
4 minutes ago, Fich420 said:

So i can draw a rectangle, but it's just the outline. Id like to create a solid black rectangle so the paint is easier to read. ss of what it looks like now 

cyOrZYG.png

Code for rectangle I have currently 


g.setColor(new Color(0,0,0,255));
        g.drawRect(15, 200, 300, 100);

 

    Rectangle t = new Rectangle(15, 200 ,300 ,100);
        g.fill(t);

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...