• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rectangle size, brown color

 
Nancy Bradley
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got two questions!
g.fillRect(140,100,20,70);
140 is the starting point in x
70 is the y point
modifying 20 I can make it wider
100 moves it up
How can I reduce the height???
How can I get brown color??? I can not find it.
Thanks in advance for your time
Nancy B
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The arguments to fillRect are the x and y coordinates of the top left corner, and the width and height of the rectangle, in that order. Note that as in most computer graphics APIs, Y=0 is in the upper left corner of the screen and increases as you move downwards.
"new Color(156, 93, 82)" is a nice JavaRanchy brown color, the color of Bruce the Moose's antlers.
 
Nancy Bradley
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
Nancy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic