• Post Reply Bookmark Topic Watch Topic
  • New Topic

Beginner java rectangle question

 
Chintan A. Shah
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for the g.fillRect(int x,int y, int width, height); method

g.fillRect(50,50,80,70);

the height is 70 right? so the bottom left co-ordinate should be 50,120 right?

apparently the bottom y-co-ordinate is 80 and not 120, could someone explain it to me? (I get 80 as a value because a rectangle is properly placed when I draw another rectangle on top of this rectangle)
 
Stevens Miller
Bartender
Posts: 1422
29
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post more of your code, Chintan?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!