minimized java code for confirm box