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.
Store the values where the rectangle is drawn in a class variable. Update that variable when the mouse is moved. Repaint.
I do it. But It does not work.
You do what? You show us no code to prove what you've done.
Originally Posted by melonka.sg
It doesn't work how? Please read Kevin's link on how to ask smart questions before replying. You are hiding information from us that we need.
But It does not work.