This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes rectangle size, brown color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "rectangle size, brown color" Watch "rectangle size, brown color" New topic

rectangle size, brown color

Nancy Bradley
Ranch Hand

Joined: Feb 25, 2004
Posts: 32
Got two questions!
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

Joined: Jul 08, 2003
Posts: 24189

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.

[Jess in Action][AskingGoodQuestions]
Nancy Bradley
Ranch Hand

Joined: Feb 25, 2004
Posts: 32
Thank you
It is sorta covered in the JavaRanch Style Guide.
subject: rectangle size, brown color
It's not a secret anymore!