mousedragged事件时控件闪烁 在使用Java Swing做程序时,使用MouseMotionListener的mousedragged鼠标事件,但拖动时,元素位置闪烁变化。 输出了位置数值查看发现位置会往左上角“瞬移”。 import java.awt.event.MouseMotionListener; public void mouseDragged(MouseEvent e) { //鼠标拖动 // TODO Auto-generated method stub panel_lable.setLocation(e.