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.
Printable View
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.
That doesn't really make sense, can you describe what you are trying to achieve.
hmmm... mix some paint in a bucket, pick it up, move it -- there ya go, movable paint!
ok here is what i am trying to doi want to be able to take that when compiled and run and be able to move it around the screen.Code:g.drawString("hello",20 ,20);
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?
i want to be able to move it around by mouse.
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().