Results 1 to 4 of 4
  1. #1
    Ryamza is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Why is my java applet program not ending?

    Deleted for completion.
    Last edited by Ryamza; 08-21-2011 at 08:23 AM.

  2. #2
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default

    Clearly, from what little evidence you've shown, the variable 'y_pos' is not > 150 and thats why your program doesn't end..

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by ozzyman View Post
    Clearly, from what little evidence you've shown, the variable 'y_pos' is not > 150 and thats why your program doesn't end..
    Nothing is clear to me. It's conceivable that the method or block that contains that bit of code is never reached. I second the recommendation that the original poster fill in the necessary details to allow us to understand the problem if he still needs our help.

  4. #4
    mlad is offline Member
    Join Date
    Mar 2010
    Posts
    22
    Rep Power
    0

    Default

    From what I can tell you are approaching this in the wrong way.

    The if statement is probably being checked before y_pos exceeds 150, and if it is not executed in repetition then the condition will never be fulfilled.

    I'm not sure if an ActionListener is exactly what you need here, but it should probably point you in the right direction; look for something that will activate when y_pos exceeds 150 rather than checking the y_pos value at a random time.

Similar Threads

  1. ending a csv
    By paul1024 in forum New To Java
    Replies: 2
    Last Post: 05-04-2011, 02:14 AM
  2. Making a program out of a Java Applet
    By Bomber_Will in forum Java Applets
    Replies: 1
    Last Post: 07-16-2009, 02:54 AM
  3. Replies: 2
    Last Post: 08-27-2008, 02:40 PM
  4. how can i turn this java program to an applet
    By anotsu in forum New To Java
    Replies: 5
    Last Post: 03-10-2008, 11:48 PM
  5. Export to Java program, applet or c/c++
    By fernando in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:55 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •