-
October 25th, 2010, 09:45 PM
#1
movable paint
how would i go about making a movable paint i know how to make the paint just not so that it can be moved around.
-
October 26th, 2010, 05:33 AM
#2
Re: movable paint
That doesn't really make sense, can you describe what you are trying to achieve.
-
October 27th, 2010, 03:32 AM
#3
Re: movable paint
hmmm... mix some paint in a bucket, pick it up, move it -- there ya go, movable paint!
-
October 28th, 2010, 10:54 AM
#4
Re: movable paint
ok here is what i am trying to do
Code:
g.drawString("hello",20 ,20);
i want to be able to take that when compiled and run and be able to move it around the screen.
-
October 28th, 2010, 12:11 PM
#5
Re: movable paint
Change your hard coded location values into variables and change their values to the screen location you want to draw the string at.
BTW how do you want to be able to move it around the screen?
-
October 28th, 2010, 08:13 PM
#6
Re: movable paint
i want to be able to move it around by mouse.
-
October 29th, 2010, 04:07 AM
#7
Re: movable paint
OK so add a MouseMotionListener to your panel and in the mouseMoved() method (if you want it to always follow the mouse) or the mouseDragged() method (if you want to click and drag it around the panel) change the location variables to the mouse's current location and call repaint().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|