烦死了,对JPanel中移除所有组件,不能监听。请大家看看: InfoCol_Application.listPanel.removeAll();
InfoCol_Application.listPanel.removeComponentListener(new ComponentAdapter (){
public void componentHidden(ComponentEvent e){
new InfoCol_Application().updateBackImage();
}
});
InfoCol_Application.listPanel.removeContainerListener(new ContainerAdapter(){
public void componentRemoved(ContainerEvent e) {
new InfoCol_Application().updateBackImage();
}
});
都不行,我疯了
InfoCol_Application.listPanel.removeComponentListener(new ComponentAdapter (){
public void componentHidden(ComponentEvent e){
new InfoCol_Application().updateBackImage();
}
});
InfoCol_Application.listPanel.removeContainerListener(new ContainerAdapter(){
public void componentRemoved(ContainerEvent e) {
new InfoCol_Application().updateBackImage();
}
});
都不行,我疯了
public void componentRemoved(ContainerEvent e) {
new InfoCol_Application().updateBackImage();
}
});
吧。
你把方法名称的意思理解错了吧,还没有注册litener, 怎么就删除lietener了。