Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Working with canvas. Rectangle won't fill.

dscarminiabielefeldOct 25 2013 — edited Oct 28 2013

Hey, i'm working with canvas.

[code]

GraphicsContext g2d;

g2d.strokeRect(x, y, w, h); //Rect gets drawn.

g2d.setStroke(Color.WHITE); //Strokes are white, works as well.

g2d.setFill(Color.BLUE); //Nothing happens. i expect the rectangle to be filled blue. Am i doing something wrong?

[/code]

Thanks y'all.

edit: lmao, trying to format my text.

This post has been answered by James_D on Oct 25 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2013
Added on Oct 25 2013
2 comments
487 views