The "paint" and "draw " method

This is the first time I'm using a draw method.

After reading through the tutorials, I realized that every time i need to draw something I have to call the paint method.

I need to give my user the ability to draw different kind of lines. Since I would not know when the "paint" method is being called it would be difficult to draw on user's command.

Could any one please tell me how I can get around the problem?

Regards

[456 byte] By [getusamaa] at [2007-11-26 15:08:39]
# 1
Let the user's command call the paint() or better: repaint() method instead.Have you ever heard about the MVC pattern, by the way?Oh, and is there any particular reason why this question can't be posted in the Swing section?
CeciNEstPasUnProgrammeura at 2007-7-8 8:59:05 > top of Java-index,Java Essentials,Java Programming...
# 2
I read in one of the forums that calling the paint method that way is not really a good idea. I've never heard of MVC pattern but have just now read about it. O and right should have posted in the swing section .... Thanks anyways
getusamaa at 2007-7-8 8:59:05 > top of Java-index,Java Essentials,Java Programming...