|How to drag and drop coaches(cars) smoothly? [message #226348]
||Fri, 10 November 2006 03:27
Originally posted by: wangyang227.21cn.com|
I'm now writting a programme that display a train station,
the station has tracks and coaches on it .
I want to drag and move coaches smoothly from one track to another,
so I make a class represent coach(car),it extends CLable and implements MouseListener and MouseMoveListener, I implements its drag and drop by compute the offset of e.x,e.y and reset location of these clabels, but during the movement it cannot display very smoothy,it has something like illusion(I'm sorry my english is not good), so i print down time by System.nanoTime(),and found it speeds much time in relocating clabels,
i don't know how to solve this problem, I haven't use GEF yet ,whether GEF can solve this problem?
please give me some advise, thank you much!
Powered by FUDForum
. Page generated in 0.02792 seconds