add constants in demo2
rename variables and add javadoc
apply format code
change objext dialogo to dialog