i have a Jframe.in order to paint it i not using paintComponent but ordinary function containing g.drawstring("sd",0,0).
when ever i click the mouse the string should appear at that point and it should move with the cursor until another click appears.
my problem after clicking the string is not appearing immediately it appears only after the mouse moves
iam calling paint method in both mouseclicked and mousemoved
anyone help me