Results 1 to 6 of 6
- 11-14-2010, 12:56 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 9
- Rep Power
- 0
method to check which type of object with which name is located at given coordinates
is there one?
I have 100 rectangles on a canvas and need to know exactly which one is located at the specified coordinates
right now I'm using contains(int x, int y) from the Rectangle class, but that doesn't really work because i need to call it on the rectangle I think is there..
-
How about having your rectangles in an ArrayList and iterating through the list.
- 11-14-2010, 01:52 PM #3
Member
- Join Date
- Nov 2010
- Posts
- 9
- Rep Power
- 0
-
- 11-14-2010, 03:24 PM #5
Member
- Join Date
- Nov 2010
- Posts
- 9
- Rep Power
- 0
-
This is odd since it should take no noticeable time at all to iterate through 100 rectangles.
Similar Threads
-
Input type Check box
By jeeva in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 02-17-2009, 02:36 PM -
Input type Check box
By jeeva in forum Advanced JavaReplies: 1Last Post: 02-05-2009, 04:04 PM -
using instanceof to get Object type and parent type?
By xcallmejudasx in forum New To JavaReplies: 2Last Post: 11-06-2008, 06:24 PM -
Object locations via grid coordinates HELP.
By deadman_uk in forum New To JavaReplies: 4Last Post: 11-18-2007, 08:32 PM -
Creating object of Type Object class
By venkatv in forum New To JavaReplies: 3Last Post: 07-17-2007, 03:33 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks