Use Java code and XML file to control GUI