Converting to Java and creating new GUI