Results 1 to 2 of 2
  1. #1
    wpark is offline Member
    Join Date
    Dec 2011
    Posts
    1
    Rep Power
    0

    Lightbulb Questions on KeyListener, ActionListener & Projectile Motion

    I am trying to create a java game called Pumpkin' Chunking which allows players to "shoot" a pumpkin as a projectile. It's a simple program. But as soon as I press the spacebar, it only "moves" a very short distance.

    I would really appreciate any feedback you can give.

    p.s. The attached zip file is a NetBeans project folder. Source files are in "src" folder.
    Attached Files Attached Files

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

    Default Re: Questions on KeyListener, ActionListener & Projectile Motion

    I count 6 Java classes in your jar. I can't speak for all, but as for myself, that's a lot of code to ask a volunteer to do a code review on. Why not instead create one small runnable and compilable class that distills your main problem without all the unnecessary program frills that are non-related to your problem? Then you can post the code itself here (since it will be small), and both you and us will be able to understand it better, run it unmodified, and try to correct its function much more easily. This is called creating an SSCCE.

Similar Threads

  1. ActionListener conflicting Keylistener
    By Jayayoh in forum AWT / Swing
    Replies: 7
    Last Post: 08-30-2011, 01:40 PM
  2. JPanel motion
    By batyuska87 in forum AWT / Swing
    Replies: 0
    Last Post: 03-06-2011, 09:17 AM
  3. ActionListener+KeyListener
    By mandelbrot in forum AWT / Swing
    Replies: 5
    Last Post: 09-10-2010, 12:25 AM
  4. Projectile Trajectory
    By shuks in forum New To Java
    Replies: 3
    Last Post: 11-27-2009, 02:07 AM
  5. How to use KeyListener and ActionListener
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 04-23-2008, 08:19 PM

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
  •