Urgent help of the person who coded this...

could the person who posted this code pls get back to me..cuz i can't seem to find u
cuz i would like to use this code of urs but i'm not sure exactly how it works out.
import java.awt.*;
public class DrawArrows
     public void drawArrow(Graphics g,int x1,int y1,int x2,int y2,int headLength,int headwidth)
     double theta;     
     double theta2;     
     int deltaX;     
     int deltaY;     
     int lengthdeltaX;     
     int lengthdeltaY;     
     int widthdeltaX;     
     int widthdeltaY;     
          deltaX=(x2-x1);     
          deltaY=(y2-y1);     
          theta=Math.atan((double)(deltaY)/(double)(deltaX));     
     if(deltaX<0.0)theta2=theta+Math.PI;     
     else theta2=theta;     
     lengthdeltaX=-(int)(Math.cos(theta2)*headLength);     
     lengthdeltaY=-(int)(Math.sin(theta2)*headLength);     
     widthdeltaX=(int)(Math.sin(theta2)*headwidth);     
     widthdeltaY=(int)(Math.cos(theta2)*headwidth);     
     g.drawLine(x1,y1,x2,y2);          
     g.drawLine(x2,y2,x2+lengthdeltaX+widthdeltaX,y2+lengthdeltaY-widthdeltaY);     
     g.drawLine(x2,y2,x2+lengthdeltaX-widthdeltaX,y2+lengthdeltaY+widthdeltaY);   
}i could only work out till the line
                                           deltaX=(x2-x1);     
          deltaY=(y2-y1);     
          theta=Math.atan((double)(deltaY)/(double)(deltaX));    pls let me know if u are still reading this or anyone else who can figure out the later part of the code.
thnx n cheerz

i could only work out till the line
deltaX=(x2-x1);
deltaY=(y2-y1);
theta=Math.atan((double)(deltaY)/(double)(deltaX));
I'm not the poster but these lines seem to compute the
angle of the arrow line.
BTW (to the posters): wouldn't the use of a
Polygon be better suited for this purpose ?Looks indeed like it is calculating the angle to the origin of a line segment.

Similar Messages

  • Hi I have adobe CC for teams, a team member is having problems opening indesign we are being asked for a serial number, ive checked on our admin account and he is one our our registered 'members'. I wasnt the person who set this up originally so I'm a bit

    Hi I have adobe CC for teams, a team member is having problems opening indesign we are being asked for a serial number, ive checked on our admin account and he is one our our registered 'members'. I wasn't the person who set this up originally so I'm a bit lost, i cant seem to find any serial numbers on the my account section and it seems we have no registered products? can you help?

    Hi There,
    We have checked the details of your team, all seat are assigned properly.
    Now there are few details that we would need in a Private Message so that I can assist you appropriately.
    Name of the user:
    Email of the user:
    Meanwhile, try the below mentioned links.
    Creative Cloud applications ask for serial number
    Sign in, activation, or connection errors | CS5.5 and later, Acrobat DC
    [Note: Details that we need is critical, make sure you send them in via Private Message only.]
    Thanks,
    Atul Saini

  • HT201441 i cant find the person who sold this iphone to me, and now i cant activate it

    i cant find the person who sold my iphone 5 to me
    now i cant activate it because it is still activated to his apple id

    You have no options but to find the previous owner.  The Activation Lock is an Anti-theft protection that cannot be bypassed, not even Apple.  If you cannot find the previous owner, turn it in to the police as it is likely to be stolen property.

  • I just bought an i phone form a pawn shop. I restored it and then it said that i had to sign into the users apple id. The problem is i dont think the person who owned this beofre me is available. So how do i restore the whole thing without his account?

    I really need help. I want to activate this phone but it is signed under another user. I cant get rid of this apple acount. How do i do it.

    123456789California wrote:
    ok so. what if i took it to apple. Would they be able to do something about this.
    No.
    123456789California wrote:
    ... should i just retun it back to the pawn shop i got it from?
    Yes.

  • To the person who runs this Discussion

    I have been unable to find a contact to send you a message.
    On the page of this discussion that lists the headers of all the topics, at the bottom after the last topic on the page, a link is offered named "More". On clicking this, a second page appears (and then later pages), continuing the list of topics. When I select a topic on the second (or third) page and reply to it, I am automatically returned to the first page. I than have to scroll down to the bottom, press the More link again, and hunt for the last topic that I read. If I were on, say, the third page, I have to scroll down twice and press More twice, and so on. Each page is re-downloaded for obvious reasons (given the large amount of traffic on this discussion.) By the time that I reach the third page, it is quite a hunt to find the last topic that I visited so that I can continue to browse. This is inelegant and wastes time.
    In the iMac (Intel) discussion, (also heavily trafficked) the other method of accessing later pages is used. That is, by a button marked Next. Having pressed that, I stay on that second page (or third page) and am returned to it, and do not have the fuss of repeatedly pressing More.
    I have looked at "Your Stuff" but there seems no relevant preference. Therefore, how can I select the second method for all topics.
    Thanks.

    Is it caused by using different tabs to get to the topics?
    First option (Overview tab):
    has this at the bottom:
    I'm guessing that it the 'More' you are referring to?
    Second option (Discussions tab):
    has this at the bottom:
    I've used the Set as default tab option for the Discussions tab for this Forum.
    Regards,
    Colin R.

  • I have lost my iphone 5. The person who has my phone right now is still using my game center id to play one of my game that i have in that phone named "Clash of Clan". Could you guys help me to sign out this icloud's ID and game center's ID from that fone

    i have lost my iphone 5. The person who has my phone right now is still using my game center id to play one of my game that i have in that phone named "Clash of Clan". Could you guys help me to sign out this icloud's ID and game center's ID from that phone for me, or anyone knows how to do this, please mail back to me. Id : "[email protected]" Thanks.

    As far as I know you can't delete the primary email address for an iCloud account.  It's assigned when the account is created.  But your neighbor wouldn't have been able to get into your iCloud account without your Apple ID and password.  Are you sure the account wasn't still on your phone when you gave it to him?
    You could migrate a copy of your data to a new iCloud account but I would still be concerned that someone else was using my old account, which presumably still has your data in it.
    I'm fairly certain that you're going to have to have iCloud support help you sort this one out as they may have the ability to make changes to an existing account that users can't.  Make an appointment with the genius bar at a nearby Apple store and have them take a look at it.  If necessary, they should be able to contact iCloud support for you.

  • Hi, I don't know who to turn to: the person who handles all the compter stuff is out of town, This A.M.I started up Firefox and there was a message re an update, I thoght I new just to click on install and wait to re start Firefox. But what I can remember

    Hi, I don't know who to turn to: the person who handles all the compter stuff is out of town, This A.M.I started up Firefox and there was a message re an update, I thoght I new just to click on install and wait to re start Firefox. But what I can remember is that another window opened and asked me to choose 'something' (an icon or banner or?), I thought I must click something (I guess I should read all clearly). Firefox did update to 3.6.4, but it also inserted some sort of what might be called a banner? But it only partly covers the right one- half of my 3 toolbars at the top of the Firefox window. It can't be used for anything as it is just a mess of colors and unknowns, except what looks like a 'top' and what I recognize as a Firefox icon (but only partly visible)!! Now, what it does do is partly hide that whole portion of the toolbars and they are hard to read and in turn make this 'thing' impossible to figure out, if I would care to? I can't find anyway to remove it or use it?? But since the Firefox icon is on it, I guess you should know what it is and how to trash it. I am sorry for this occurrence caused my my carelessness, but I'm not much of a computer person ----HELP! Thank you for any help. Judi
    == This happened ==
    Every time Firefox opened
    == Today, Thrsday June 24, 2010

    The only thing I can imagine: it's a [https://addons.mozilla.org/en-US/firefox/personas/ Persona].
    Tools->Add-ons->Themes
    Here should be the persona (lightweight theme)
    and a button "Remove"
    Click it (button Remove), and it (Persona, this mix of colors) should go away instantly.
    Does it help you?

  • All of a sudden my email asks a password. I use Thunderbird at work and I have not set this password. The person who did left. How do I login now?

    I really don't know computers.
    I have been working here now for three months and it is just me who works here so I can't ask anyone.
    It was working fine until all of a sudden when i press get mail i get:
    please enter a password for user ...... on server ...... .
    I have not set the pasword and I can't get in contact with the person who did.
    Is there any chance of deleting it? Go passed it? I work at a hostel and we make all our bookings via email. I really need this to work!

    You administer your email password with your email provider. You need to work with them to reset a forgotten password.
    Go to their web mail or email help site and look for a link to reset your password.

  • HT201441 i have iphone that he has a apple acount but i don't now her acount and password because he come's from england and i don't now a person who was this iphone before me.can you help me to find this person

    i have iphone thet he has an apple acount but i don't now her acount and i need help to find a person who was this iphone before me to ask her for a apple acount and password.please help me acount start k,,,,,@k,,,,,.uk if anyone now this person tell me please

    Welcome to the Apple community.
    Unfortunately, you cannot do very much with your phone unless you get assistance from the previous owner, they should either provide you with the password to unlock it or remove their account from the phone entirely remotely through iCloud.com > Find My Phone.
    If you have this persons email address, try sending them an email and asking them to remove their ID as described above.

  • Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here.

    Hi guys,
    I posted a question which was reviewed and published, now i am not able to see the quesrion and the replies anymore.
    I am getting this message "Access to this place or content is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here."
    Can you please help.
    Thank you
    Andy

    You get this due to your newer status in forum, most of the contect needs to be reviewed and approved by one of us ie modertors of this space

  • My iphone4 disconnecting calls after 3 rings and show these calls as "missed calls" while the person who calls me still hear a dial ring. this started to happend after i upgraded to ios 7.0.4 please advise

    my iphone4 disconnecting calls after 3 rings and show these calls as "missed calls" while the person who calls me still hear a dial ring. this started to happend after i upgraded to ios 7.0.4 please advise
    this is really frustrating since i cant pick up calls with only 3 rings and i always miss them
    i tried to restore like 3-4 times, didnt help
    even tried to set the iphone as a "new iphone" on itunes and it didnt help

    Generally, when going out of the country and using a foreign SIM, carrier files can be changed. Go to Settings>General>About>and look at Carrier? What does it say? You may have to perform a restore. You can try a restore from a backup, that would reinstall the iOS, and would provide the latest AT&T carrier file as well. See if this will fix the problem.

  • TS4002 I bought iPad and I can not access, A message appears asking me account and password when i return to the person who I purchased it from him, he told me that he forgot the account and password I want a solution to the problem, because in this way I

    I bought iPad and I can not access, A message appears asking me account and password when i return to the person who I purchased it from him, he told me that he forgot the account and password
    I want a solution to the problem, because in this way I will not benefit from the iPad

    There is no solution.  You have to provide the ID and password.  There is no way around it.  If the person you bought it from can't provide it, return it and get your money back.

  • I can't be the only person who has this problem - when a month ends on a Saturday I can't drag events into the next month and instead have to cut and paste - a real pain in the butt. I thought there was something called "scroll" but I can't find that

    I can't be the only person who has this problem with iCal- when a month ends on a Saturday I can't drag events into the next month and instead have to cut and paste - a real pain in the butt. I thought there was something called "scroll" but I can't find that.

    Yeah that works, but, it involves a click on the event, a click on edit, a click on the date, keystrokes, plus, since you can't see the next month you have to have a calendar in front of you so as to put it to the right date. It's easier just to cut it and advance the month and paste it, once you are in the right month you can move it around helter skelter willy nilly no problems. Although now that you mention it I will try it, maybe it is easier than cut and paste as I don't really care about the date, as long as it gets moved into the right month I can drag it around all I want.

  • Print Problem - PDF is OK on Windows 7, but OK on Windows XP with "Acrobat Reader An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."

    I have received a PDF which prints fine in Windows 7 but with Windows XP I get "Acrobat Reader An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem." and a blank piece of paper passes through the printer. I appreciate that Windows XP is no longer supported but I would like to think that the solution to this problem is not too difficult!
    I have tried Acrobat 9, 10 and 11.
    Any advice (apart from use Windows 7! ) would be most welcome.
    Many thanks.

    If you use the same Adobe Reader versions with the same PDF on Windows 7 and XP, then I would expect the outcome to be the same.
    Is this a local or online PDF?
    If local, is the file really exactly the same?
    If online, in what browser?

  • HT204053 I am not able to update my apps because every time I am doing this, it is asking for a password which I have never used and the person who used it is in no more contact. how can i get my id instead of his??

    I am not able to update my apps because every time I am doing this, it is asking for a password which I have never used and the person who used it is in no more contact. how can i get my id instead of his??

    Apps can only be updated using the same Apple ID and password they were originally purchased with.

Maybe you are looking for

  • HT4059 Is there any way to read ibooks in my itunes library from my PC?

    I have an ipad2 but would also like to be able to read purchased books on my PC (XP). Itunes does display the books I've purchased but I haven't been able to figure out how to read them using the PC. Is there any way to do this or is this just a 'fea

  • Safari won't launch - please help..thanks!

    Hey everyone, Every time i open Safari it quits right away..but i dont think its Safari's problem because im using it on a different account...it give me this report: Date/Time: 2008-06-25 12:26:01.281 -0400 OS Version: 10.4.11 (Build 8S2167) Report

  • Building table based on a pageFlowScope variable

    Hi, I am trying to show a page with a popup that contains a region. Within the region, I am trying to build a table using a pageFlowScope variable as <af:table var="row" rowBandingInterval="0" id="t4" value="#{pageFlowScope.expression}" binding="#{ex

  • How Do I edit the Categories in Office Address Book?

    I have figured how to assign a category to an address in Office Address Book, but I can't edit the categories in order to create the categories I need. When I open an address book entry, the categories pull-down menu is in the top bar, when I open up

  • Launching itunes error miniplayer.dll

    When I launch itunes on my laptop I receive an error that says "error writing to file C:\program files\itunes\itunesminiplayer.dll.verify that you have access to that directory." I tried to uninstall but it brings up errors. I have tried to install a