我有一個界面,用戶可以移動一個對象,或者移動滑塊可以移動對象。我想知道什麼觸發了componentMoved方法。這將是理想的,如果我能做到這一點: public void componentMoved(ComponentEvent ce){
if(ce.getSource() == Component.SOURCE_HUMAN){
// Do something here
我有一個不尋常的問題,其中,只要mouseListener/Adapter檢測到事件,就會禁用componentListener/Adapter。在下面的代碼中,componentMoved()方法覆蓋完美工作,直到在MouseAdapter()中觸發mouseClicked()方法覆蓋。任何想法如何解決這一問題? public AlertScroller(String msg,Color col