• 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
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!