Data flow to & fro from java to UI