• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

method calling

 
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 ]
 
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
 
Our first order of business must be this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic