I'm having real trouble understanding how to monitoring of JVMs heap usage is supposed to work. I've read multiple threads and they all use the same pattern, taken from this source: https://docs.oracle.com/javase/7/docs/api/java/lang/management/MemoryPoolMXBean.html
However, the listener never seams to fire an event. I just want to be able to display the current heap size of JVM in real time INSIDE my GUI. How can I do that?