Results 1 to 4 of 4
Thread: move object
- 01-06-2011, 05:06 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 3
- Rep Power
- 0
move object
Hi,
I am a beginner in a java. Could you help me? I don't know how to make object move.
I have a small rectange. And It has to move there where is a cursor.
I think I have to make:
public void mouseMoved(mouseEvent e)
{
Point souradnice = e.getPoint();
}
I don't know what to type next.
Please, help me.
- 01-06-2011, 05:18 PM #2
Store the values where the rectangle is drawn in a class variable. Update that variable when the mouse is moved. Repaint.
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 01-06-2011, 06:23 PM #3
Member
- Join Date
- Jan 2011
- Posts
- 3
- Rep Power
- 0
I do it. But It does not work.
-
Similar Threads
-
Move from console to GUI
By MaxMonic in forum Advanced JavaReplies: 2Last Post: 01-01-2011, 06:34 AM -
How To Move An Object On A Random Path
By burakesme in forum Java 2DReplies: 1Last Post: 05-23-2010, 05:22 PM -
Help Using KeyListener to Move an Object
By jjonesmu in forum New To JavaReplies: 3Last Post: 04-20-2010, 10:35 PM -
How To Use Key Binding or Key Listener to move object
By jjonesmu in forum New To JavaReplies: 1Last Post: 04-20-2010, 10:31 PM -
How do you move a picture?
By Addez in forum New To JavaReplies: 6Last Post: 11-03-2009, 08:44 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks