This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

method calling

 
hansie klinefelt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having trouble calling a method from another class, how do I go about this?
Thanks,
Hansie
 
hansie klinefelt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry here is my code, I am trying to call getSize and getLeft from the RenderRects class.
Also could you give me some ideas on how to sort the rectangles by size and then draw them.

Thanks for any help
Hansie
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ August 05, 2002: Message edited by: Dirk Schreckmann ]
 
Snigdha Solanki
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RenderRects r = new RecnderRects();
r.getLeft();
Where is getSize()? Are you using Component's getSize() method?
 
hansie klinefelt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getLeft and compareSize (not getSize, sorry) are in the Rectangle class. When renderFromLeft is called the rectangles in the vector are supposed to be redrawn starting with the rectangle that is furthest from the left, so that the rectangle closest to the left is on top.
Thanks,
Hansie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic