Results 1 to 12 of 12

Thread: Mouse Dragged

  1. #1
    chetoos is offline Member
    Join Date
    Jun 2011
    Posts
    10
    Rep Power
    0

    Default Mouse Dragged

    please,i want to make move for frame by dragging from Jpanel

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default

    Do you have any code for this yet?
    I'd suggest starting with a small program to work out the techniques.
    First create a frame and show it. Then add a Timer to move the frame on the screen.
    Then add a panel with a mouse listener and connect the listener to the frame moving code.

  3. #3
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

  4. #4
    chetoos is offline Member
    Join Date
    Jun 2011
    Posts
    10
    Rep Power
    0

    Default

    @Norm:look,first i used netbeans and i can't make Mouse listener and i think that i will make event mouse dargged but i can't know code in this event so i want u to tell the code in this event finally thank u for answer

    @camickr:thank u for this web but this code for netbeans or Eclipse?

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default

    Sorry, I don't know anything about your IDE. An IDE should not cause a problem coding a mouse listener.

    There is probably code samples on this forum. Do a Search.

  6. #6
    chetoos is offline Member
    Join Date
    Jun 2011
    Posts
    10
    Rep Power
    0

    Default

    are you use netbeans or Eclipse?

  7. #7
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default

    I don't use a full IDE. I use an enhanced editor.

  8. #8
    chetoos is offline Member
    Join Date
    Jun 2011
    Posts
    10
    Rep Power
    0

    Default

    can u tell me techincales in java because i make project our faculty and i want to make fantastic project?

  9. #9
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default

    Sorry, I'm only a programmer, not an author.

  10. #10
    chetoos is offline Member
    Join Date
    Jun 2011
    Posts
    10
    Rep Power
    0

    Default

    ok thnx

  11. #11
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default

    i can't make Mouse listener and i think that i will make event mouse dargged but i can't know code in this event
    See: How to Write a Mouse-Motion Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing > Writing Event Listeners)

    but this code for netbeans or Eclipse?
    Its Java!!!

  12. #12
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    4

    Default

    It is not good to use netbeans or other auto-generated codes when you are just starting to learn java. Most common mistake of begginers is they are taking advantage using something like netbeans then when they encounter problem or error they do not know how to debug it and what it causes that error.

    Camickr is giving you the link which will help you to do what you want.

Similar Threads

  1. Is this Mouse program possible?
    By gblax123 in forum New To Java
    Replies: 4
    Last Post: 03-26-2011, 10:33 AM
  2. Mouse Listener
    By Quizerno in forum New To Java
    Replies: 8
    Last Post: 03-17-2011, 05:25 AM
  3. Key/mouse movement
    By falkon114 in forum New To Java
    Replies: 3
    Last Post: 02-21-2011, 02:12 AM
  4. Mouse
    By PhQ in forum AWT / Swing
    Replies: 18
    Last Post: 08-18-2010, 04:05 PM
  5. Mouse Listener for mouse floating over object?
    By Krooger in forum AWT / Swing
    Replies: 1
    Last Post: 11-18-2009, 04:34 AM

Posting Permissions

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