如果Frame中有个表格JTable,且允许双击单元格编辑,那么可能在编辑中移动Frame时出现单元格偏移,可用下面的方法解决
this.setDragEnabled(true);
this.addEventListener(DragAndDropEvent.DRAG_RECOGNIZED, __onDragRecognized, false, 0, true);
/** 防止移动Frame时正在编辑的单元格移位(焦点问题) */
private function __onDragRecognized(event:DragAndDropEvent):void{
if(_paramTablePanel.table.getCellEditor() != null){
_paramTablePanel.table.getCellEditor().stopCellEditing();
}
}