IDE have shown you the values of protected (source
, yellow mark) and private (columnFootersVisible
, red mark) fields of objects (event and table). While it's possible to access private fields in Java through reflection, the normal way is to use public API.
Both event's source
and Table's columnFootersVisible
fields have proper public accessors: getSource and isFooterVisible, correspondingly. So, you can use these methods:
if(event.getSource() instanceOf Table) {
Table table = (Table) event.getSource();
boolean isFooterVisible = table.isFooterVisible();
}
If, for some obscure reason, you still want to access private fields directly, then you might want to take a look on this question:
Is it possible in Java to access private fields via reflection