Add java code to SettingsDialog