需要一些帮助来帮助我了解jtable cell侦听器。
我问这个问题的原因是我正在将JTable与DefaultTableModel一起使用。
以下是我正在使用的内容:
table.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
System.out.println(evt.getOldValue());
System.out.println(evt.getNewValue());
}
});
这是我得到的:
null
javax.swing.JTable$GenericEditor@4b20aa93
javax.swing.JTable$GenericEditor@4b20aa93
null
null
javax.swing.JTable$GenericEditor@4b20aa93
com.apple.laf.AquaImageFactory$SystemColorProxy[r=255,g=255,b=255]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=9,g=80,b=208]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=202,g=202,b=202]
null
false
com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=255,g=255,b=255]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=202,g=202,b=202]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=9,g=80,b=208]
false
true
com.apple.laf.AquaImageFactory$SystemColorProxy[r=255,g=255,b=255]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=0,g=0,b=0]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=9,g=80,b=208]
com.apple.laf.AquaImageFactory$SystemColorProxy[r=202,g=202,b=202]
true
false