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

    Default Help with creating a shape and moving it with mouse and keyboard!

    Hello I'm new to Java, and I have to make a solid shape and move it with my mouse and my keyboard.
    My teacher literally taught me nothing, and he is expecting me to do this project...
    Please help! Thank you!
    I have to use Netbeans IDE

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    Start with Trail: Creating a GUI With JFC/Swing: Table of Contents (The Java™ Tutorials).

    It will show you how to create a GUI and add components to it. You can then start with section like "How to Write a Mouse Listener" to help with dragging. You might also want to check out the sectoin on "Custom Painting". To move the object with a keyboard you will want to check the section on "How to Use Key Bindings".

Similar Threads

  1. Bluetooth mouse/keyboard emulation
    By matech in forum Advanced Java
    Replies: 0
    Last Post: 01-29-2011, 04:40 PM
  2. Make shape rounding (moving in circle)
    By mneskovic in forum New To Java
    Replies: 8
    Last Post: 08-17-2010, 03:05 PM
  3. Help with mouse moving object and colisions
    By macwadu in forum AWT / Swing
    Replies: 12
    Last Post: 07-01-2010, 11:18 PM
  4. locking keyboard and mouse
    By vibhor in forum AWT / Swing
    Replies: 4
    Last Post: 02-26-2009, 11:12 PM
  5. how to resize a shape on a jpanel, using mouse
    By New to JAVA in forum New To Java
    Replies: 1
    Last Post: 12-26-2008, 07:43 PM

Posting Permissions

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