change UI file to use java code