wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes method calling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "method calling" Watch "method calling" New topic
Author

method calling

hansie klinefelt
Greenhorn

Joined: Aug 05, 2002
Posts: 3
I am having trouble calling a method from another class, how do I go about this?
Thanks,
Hansie
hansie klinefelt
Greenhorn

Joined: Aug 05, 2002
Posts: 3
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

Joined: Sep 07, 2000
Posts: 128
RenderRects r = new RecnderRects();
r.getLeft();
Where is getSize()? Are you using Component's getSize() method?


Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
hansie klinefelt
Greenhorn

Joined: Aug 05, 2002
Posts: 3
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: method calling
 
Similar Threads
How to update JTable Data???
return
VERY URGENT --- Help please....executing SQLs within in EJB method ... failing
How to call a method in the supermost class
Are these two methods equivalent?