Results 1 to 9 of 9
- 08-25-2010, 04:46 AM #1
Senior Member
- Join Date
- Jul 2010
- Posts
- 124
- Rep Power
- 0
(noob question :0) Making point relative to applet location
Sorry for asking such a basic question,but:
I have about 90 points that i made in File A (java.awt.Point). They are all relative to 0,0 on the screen, and i unfortunately realized that right when I just got about done with this program. Suppose I need them to be all relative to the applets position on the GUI, but I dont want to have to go back and re-formulate my points. Example:
Applet location (relative to 0,0 on the screen) : 200,200.
Point p location : 144,141.
I need to make that point relative to 200,200. What should I do? Thanks!
- 08-25-2010, 04:56 AM #2
Um wouldn't adding 200 to all point's x & y's coordinate do the trick?
"Experience is what you get when you don't get what you want" (Dan Stanford)
"Rise and rise again until lambs become lions" (Robin Hood)
- 08-25-2010, 03:08 PM #3
Senior Member
- Join Date
- Jul 2010
- Posts
- 124
- Rep Power
- 0
Thanks mate for your reply-
This was the obvious solution, but it would take way too long to add this to 90 points. How else?
- 08-25-2010, 03:33 PM #4
How long is that? You wouldn't be able to see a tic on the clock for the time to update 90 points.take way too long to add this to 90 points
- 08-25-2010, 03:37 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
- 08-25-2010, 04:07 PM #6
Senior Member
- Join Date
- Jul 2010
- Posts
- 124
- Rep Power
- 0
And how do you make it relative to that position? Do you simply click on the applet to activate the coordinate system?
- 08-25-2010, 04:09 PM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
- 08-25-2010, 04:18 PM #8
Senior Member
- Join Date
- Jul 2010
- Posts
- 124
- Rep Power
- 0
Ah okay, thanks. To tell you the truth, I learn by example, and not so much reading. This makes me want to read more next time. Thanks,
Crikey
- 08-25-2010, 04:22 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Reallyy noob question
By x2robbie2x in forum New To JavaReplies: 3Last Post: 02-18-2010, 04:58 AM -
Noob button question.
By dudejonne in forum Java AppletsReplies: 4Last Post: 10-20-2009, 10:51 PM -
Question - I'm a noob!
By Insaeno in forum New To JavaReplies: 5Last Post: 08-04-2008, 03:20 AM -
Applet Image location
By MarkWilson in forum NetBeansReplies: 3Last Post: 06-30-2008, 07:37 AM -
Noob question- easy
By mattonitto in forum New To JavaReplies: 7Last Post: 06-13-2008, 12:26 AM


LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks