Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Paint Command?  RSS feed

 
Davey Lopez
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello My task is to draw a chess board with the java graphics. It was quite simple doing the board the only have question I have now is someone knows of a command that paints inside the square as they would have to be black and white

-- Thank you


 
Ron McLeod
Saloon Keeper
Posts: 1424
206
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would Graphics#fillRect work for that?
 
Piet Souris
Rancher
Posts: 1782
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It most certainly will.

And an economical way of doing: draw a big white square as your board,
and then only draw 32 black squares on it.

Greetz,
Piet
 
Davey Lopez
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All right thanks everyone that worked
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!