Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 34 of 34

Thread: Add drawing function MouseMotionEventListener program?

  1. #26
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    Did you try what I suggested in my last post?
    If you don't understand my answer, don't ignore it, ask a question.

  2. #27
    Member
    Join Date
    Sep 2012
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    I'm thinking the issue is because I'm creating that new MyPanel, so it just throws that new 450,450 area in the next available slot

  3. #28
    Member
    Join Date
    Sep 2012
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    Quote Originally Posted by Norm View Post
    Did you try what I suggested in my last post?

    but where am I copying the drawstring code to?

  4. #29
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    where am I copying the drawstring code to?
    Copy the whole paintComponent() method.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #30
    Member
    Join Date
    Sep 2012
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    Ah ok i'll do that, be back in a sec!

  6. #31
    Member
    Join Date
    Sep 2012
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    Quote Originally Posted by Norm View Post
    Copy the whole paintComponent() method.
    Wait a sec, where is the paintComponent method being copied to?

  7. #32
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    To the class where you want to do some custom painting and drawing.
    If you don't understand my answer, don't ignore it, ask a question.

  8. #33
    Member
    Join Date
    Sep 2012
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    Quote Originally Posted by Norm View Post
    To the class where you want to do some custom painting and drawing.
    Ahhh I see what you mean! Ok now that I got this to work I'm pretty sure I can add some basic mouse painting functions without too much issue!

    Thanks Norm!

  9. #34
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Add drawing function MouseMotionEventListener program?

    Good luck.
    If you don't understand my answer, don't ignore it, ask a question.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [SOLVED] Problem with a simple drawing program
    By Saiimon in forum What's Wrong With My Code?
    Replies: 6
    Last Post: May 24th, 2012, 03:45 PM
  2. Drawing activation stack for program with Exception
    By InfiinteSound in forum Exceptions
    Replies: 9
    Last Post: March 4th, 2012, 03:16 PM
  3. Validation based program that doesn't function properly
    By kratos75 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 28th, 2011, 06:34 AM
  4. Line Drawing Program
    By The_Mexican in forum What's Wrong With My Code?
    Replies: 5
    Last Post: November 13th, 2010, 03:54 PM
  5. How To Make The Program Jump To The Next Function..
    By Kumarrrr in forum What's Wrong With My Code?
    Replies: 7
    Last Post: March 3rd, 2010, 12:33 AM