Trouble with writing this (this is not the cash register)

someone please help me with this i want to make it so that if someone crashes then he will get back up on mouse click
is there a way to do this
public class CollisionHandler
public CollisionHandler(Ground ground1)
ground = ground1;
public boolean isInCollision(PhysicsPoint physicspoint)
return physicspoint.place.y > (float)ground.getMaxY(physicspoint.place.x);
public void handleCollision(PhysicsPoint physicspoint)
moveToSurface(physicspoint);
physicspoint.collisionToSlope(ground.getSlope(physicspoint.place.x), ground.getFriction(physicspoint.place.x));
private void moveToSurface(PhysicsPoint physicspoint)
float f = 0.0F;
Vector2 vector2 = Vector2.multiply(ground.getSlopeNormal(physicspoint.place.x), 0.4F);
Vector2 vector2_1 = physicspoint.place;
for(int i = 0; i < 10; i++)
vector2_1.x += vector2.x;
vector2_1.y += vector2.y;
float f1 = ground.getMaxY(vector2_1.x);
if(vector2_1.y <= f1)
return;
public Vector2[] isInCollision(PhysicsSphere physicssphere)
Object obj = null;
Vector2 vector2_1 = new Vector2(0.0F, 0.0F);
Vector2 vector2_2 = new Vector2(0.0F, 0.0F);
int i = 0;
for(int j = -(int)physicssphere.radius; j <= (int)physicssphere.radius; j += 4)
Vector2 vector2 = createContactPlace(physicssphere, j);
if(isInCollisionWithPlace(physicssphere, vector2))
vector2_1 = Vector2.add(vector2_1, vector2);
vector2_2 = Vector2.add(vector2_2, ground.getSlope(vector2.x));
i++;
if(i == 0)
return null;
} else
Vector2 avector2[] = new Vector2[2];
avector2[0] = Vector2.divide(vector2_1, i);
avector2[1] = Vector2.normalize(vector2_2);
return avector2;
private Vector2 createContactPlace(PhysicsSphere physicssphere, int i)
float f = ((PhysicsPoint) (physicssphere)).place.x - (float)i;
float f1 = ground.getMaxY(f);
if(f1 < ((PhysicsPoint) (physicssphere)).place.y)
f1 = ((PhysicsPoint) (physicssphere)).place.y;
return new Vector2(f, f1);
private boolean isInCollisionWithPlace(PhysicsSphere physicssphere, Vector2 vector2)
float f = Vector2.substract(vector2, ((PhysicsPoint) (physicssphere)).place).length();
return f <= physicssphere.radius;
public void handleCollision(PhysicsSphere physicssphere, Vector2 avector2[])
if(moveToSurface(physicssphere, avector2))
physicssphere.collisionToSlope(avector2[1], avector2[0], ground.getFriction(((PhysicsPoint) (physicssphere)).place.x));
private boolean moveToSurface(PhysicsSphere physicssphere, Vector2 avector2[])
RotateMatrix33 rotatematrix33 = new RotateMatrix33(4.712389F);
Vector2 vector2 = Vector2.multiply(Matrix33.multiply(rotatematrix33, avector2[1]), 0.35F);
if(Vector2.dot(vector2, ((PhysicsPoint) (physicssphere)).speed) >= 0.0F)
return false;
Vector2 vector2_1 = ((PhysicsPoint) (physicssphere)).place;
for(int i = 0; i < 20; i++)
vector2_1.x += vector2.x;
vector2_1.y += vector2.y;
avector2 = isInCollision(physicssphere);
if(avector2 == null)
break;
vector2 = Vector2.multiply(Matrix33.multiply(rotatematrix33, avector2[1]), 0.35F);
return true;
private static final int SPHERE_COLLISION_STEP = 4;
Ground ground;
}

i dont think i have that gui thing or whatever, how
can i get itGUI is Graphical User Interface--buttons, windows, etc. Some programs have one, some don't. If you want your program to respond to mouse clicks, you have to use classes that are used for handling GUIs. (Note: I don't think your program would necessarily have to display any windows or other graphical elements just to be able to respond to clicks, but then I don't do GUIs, so I might be talkin' outta my butt.)
Here are some GUI tutorials. I'm too lazy to strip out the now-broken url tags, so you'll have to copy and paste the URLs yourself.
Trail: Creating a GUI with JFC/Swing
How to Make Dialogs
How to Use Progress Bars
Multi-threading in Swing
Threads and AWT/Swing (IBM article: section at bottom)
Using HTML in Swing Components

Similar Messages

  • I downloaded Firefox 4.0 and it says to re-install the toolbar but I have not been successful in doing so. Can I go back to the older version? I had no trouble with that and I do not like this new version at all.

    I downloaded Firefox 4.0 and it says to re-install the toolbar but I have not been successful in doing so. I went to the forums and tried all the suggested fixes but none worked. Can I go back to the older version? I had no trouble with that and I do not like this new version at all. I tried a system restore twice and it did not fix the problem.

    I would imagine it's the MyWay Searchbar which is classified by most anti-malware scanners as adware, or even worse as spyware. I say that because I see "SmileyCentral" in your list of plugins and that's an add-on for that particular toolbar. You can disable that via Tools | Add-ons | Plugins.
    There are a number of toolbars which won't work with Firefox 4 anymore due to the enhanced protection mechanisms in the browser.
    Mozilla recommends that you only install add-ons from its own security site @ https://addons.mozilla.org/en-US/firefox/?browse=featured Generally speaking, those have all been tested and approved. The exceptions are those currently under review which are marked with a yellow banner to warn users that they haven't passed Mozilla's labs yet.

  • Im having trouble with error 13019 I have read the previous discussions about this matter and have tried to do them except for the fact that under the music tab when clicking on my ipod every thing is frozen. It s not my comp. and i dont wish to restore.

    Im having trouble with error 13019 I have read the previous discussions about this matter and have tried to do them except for the fact that under the music tab when clicking on my ipod every thing is frozen. It s not my comp. and i dont wish to restore. Please help!

    If you are wondering why you are not getting any responses, it is because you have vented a complaint without any details that make any sense or give anyone something to work on.
    If you want help, I suggest actually detailing what has happened, with versions of software etc. Anything that would let us assist.
    As a start I am guessing that you have not really got the hang of "How it all works". Firstly download the Pages09_UserGuide.pdf from under the Help menu. Read that and view the Video Tutorials in the same place. A good addition would be the iWork 09 Missing manual book and something to help you learn how to use your Mac.
    If there are specific tasks you need help with:
    http://www.freeforum101.com/iworktipsntrick/index.php?mforum=iworktipsntrick
    Is a good resource.
    Peter

  • I have two macs at my house, and multiple iPhones. I want to keep the same apple id as everyone else, but i want to put my own music only on my iPhone. I want to do this with my laptop which is not the family's main iTune's computer.

    I have two macs at my house, and multiple iPhones. I want to keep the same apple id as everyone else, but i want to put my own music only on my iPhone. I want to do this with my laptop which is not the family's main iTune's computer.

    If you use the same Apple ID for iCloud on each device, yes. However, you can use the same Apple ID for iTunes content on each device, but different Apple ID's for iCloud, iMessage, FaceTime, etc., on each device. That way, you can have whatever iTunes content you want on each phone, but keep all of the other data separate. You can create another Apple ID here:
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/wa/createAppleId?loca lang=en_US
    Must be a verified email address.

  • HT1414 I can´t syncronize my Iphone 5 with Itunes 11.1.5.5. The option looks like locked in the menu. I have tried reinstalling Itunes but this is not the solution. Actually my OC runs under Windows 8.1. IOS 7.1. Someone can help me, please?

    I can´t syncronize my Iphone 5 with Itunes 11.1.5.5. The option looks like locked in the menu. I have tried reinstalling Itunes but this is not the solution. Actually my PC runs under Windows 8.1. and Iphone runs under IOS 7.1. Someone can help me, please?

    It seems I have solved my own problem . . . well hopefully !!   ;-)
    I was using a 'non' Apple cable. When I swithced to using the stock cable that came with my iPhone, iTunes can now see that I have a 'Device' and identifies it correctly as my iPhone.
    Hopefully this may help others . . . ?
    Cheers,
    Grant.

  • After several years of use very satisfied with Firefox, recently loaded version (4.0.1) severely slows my browsing, and even my system, especially when there are pictures or videos. I said that this was not the case before and my system is Windows XP SP3.

    After several years of use very satisfied with Firefox, recently loaded version (4.0.1) severely slows my browsing, and even my system, especially when there are pictures or videos. I said that this was not the case before and my system is Windows XP SP3.

    I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
    When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
    At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
    I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6.

  • TS1702 I had this Scrabble on my iPad2 and began to have connection problems, it would lock in the "connecting" position. This is not the first time Scrabble has had problems with interface. Typically customers delete the Ap then download it again to rein

    I have contacted EA about this and can find no help. I had this Scrabble on my iPad2 and began to have connection problems, it would lock in the "connecting" position. This is not the first time Scrabble has had problems with interface. Typically customers delete the Ap then download it again to reinstall it. During the process you sign in and approve the purchase KNOWING that another window will open saying that you have previously purchased it and that there is no charge. So what happened this time? It will not connect and all of my saved and current games are wiped out. I want my money back, this game interface is pretty junk and operates like some ancient DOS program,,bug,bug,buggy. I want my money back.

    Go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • Help, I get error 13019 when trying to sync my 5th generation ipod. I see others have had this error with the touch, but this is not the touch. What can be done?

    Help, I get error 13019 when trying to sync my 5th generation ipod. I see others have had this error with the touch, but this is not the touch. Does anyone have any ideas what can be done?

    follow the steps in this article first
    =http://support.apple.com/kb/HT1451
    after that restore your ipod and resync it
    hope this helps:)

  • I'm having trouble with my iPhone 4, but on the black screen with the I tune music circle with the charger below it. I just don't get it after I plugged to the computer and it's not working :.(

    I'm having trouble with my iPhone 4, but on the black screen with the I tune music circle with the charger below it. I just don't get it after I plugged to the computer and it's not working :.(

    The screen is telling you to connect the iPod to your computer and restore via iTunes
    iTunes: Restoring iOS software
    BTW, this is the iPod touch forum

  • Firefox is not saving open tabs when closing, it says other session of Firefox is running but this is not the case.

    Firefox used to save open tabs when closing the browser. This no longer happens and Firefox says other session running. Task Manager shows that this is not the case.
    Recently installed an flv/mpeg viewer "aLot" which placed a toolbar in Firefox.
    Am running Firefox 3.0.5 on Windows XP with Service Pack 3.

    Your useragent says your are running Firefox 3.6.13 -> is that true.
    If not, do the following and post back your new Firefox version:
    * Type about:config in the URL bar and hit Enter
    * If you see the warning, you can confirm that you want to access that page.
    * Filter = general.useragent.
    * Right-click the preferences that are bold, one line at a time, and select Reset.
    * Then restart Firefox

  • Mail does not create new emails based on the highlighted mailbox, but rather the receiving mailbox of whatever individual email happens to be highlighted. This was not the case prior to Lion. Is this a bug or an error on my part?

    Mail does not create new emails based on the highlighted mailbox, but rather according the receiving mailbox of whatever individual email happens to be highlighted. This was not the case prior to Lion. Is this a bug or an error on my part? (I do have the setting for creating new emails from the highlighted mailbox checked.)

    The questions about time was not only because of thinking about the Time Machine, but also possible impact on recognizing which messages remaining on a POP server (doesn't apply to IMAP) have been already downloaded. In the Mail folder, at its root level, in Mail 3.x there is a file named MessageUidsAlreadyDownloaded3 that should prevent duplicate downloading -- some servers may not communicate the best with respect to that, and the universal index must certainly be involved in updating that index file. If it corrupts, it can inhibit proper downloading. However, setting the account up in a New User Account and having the same problem does not point that way, unless your POP3 server is very different from most.
    That universal index is also typically involved when messages are meant to be moved from the Inbox to another mailbox -- in Mail 3.x the message does not move, but rather is copied, and then erased from the origin mailbox. That requires updating the Envelope Index to keep track of where the message is, and should keep track of where it is supposed to have been removed after the "Move".
    Ernie

  • This domain name can't be used because it contains a protected word or inappropriate language. Please contact support if you feel this is not the case.

    we are unable to domain smippl.com it gives error
    This domain name can't be used because it contains a protected word or inappropriate language. Please contact support if you feel this is not the case.
    It is a real estate company :
    SARLA MADAN INFRASTRUCTURE PROJECTS PRIVATE LIMITED
          Address : "SWAYANG TOWER" (STILT FLOOR),
          Plot No. M-73, Madhusudan Nagar, Unit-IV, Bhubaneswar-751001, Odisha,
          India
    current email : [email protected]
    Domain to setup email in Windows Live outlook express  - smippl.com
    waiting for solution

    Hi,
    I wonder if you are registering domain name here:
    https://domains.live.com/Signup/SignupDomain.aspx?dn=&ss=0&ctkn=&et=0
    If so contact with windows live support:
    https://support.live.com/default.aspx?scrx=1
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • The most recent update erased all of my bookmarks. I tried the steps to find them and they are gone. This is not the first time this has happened and it extremely disuptive.

    the most recent update resulted in a loss of ALL of my bookmarks. This is not the first time this has happened and it is very disruptive. I tried the steps suggested to find the bookmarks but that failed.

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • Hi , I am trying to install some updates for purchased apps but i got this message "This update is not available for this apple ID either because it was bought by a different user or the item was refunded or cancelled" and this is not the case

    Hi , I am trying to install some updates for purchased apps but i got this message "This update is not available for this apple ID either because it was bought by a different user or the item was refunded or cancelled" and this is not the case

    Apple appears to be having trouble on their servers. Try again in a few hours.
    (106358)

  • IPad: Launch YouTube, click Add a comment. Google sign-in box cannot be dismissed by pressing the X. This was not the case in any of the four iPads in earlier OS versions. Only occasionally it is possible to press the X and close the sign-in box.

    iPad: Launch YouTube, click Add a comment. Google sign-in box cannot be dismissed by pressing the X.
    This was not the case in any of the four iPads in earlier OS versions. Only occasionally it is possible to press the X and close the sign-in box.

    if this is the first time to happen in this version of the app. then it may just be a flaw with that version, if you have already un-installed and re-installed the app then it will just be a waiting game at this point until youtube hears and it and fixes it

Maybe you are looking for