you can't use java. You're thinking javascript. Completely different.
What you'd need to do is use FormName.submit() to submit the form without the user clicking a button. However you'll need some kind of action to happen before the form is submitted. The user moves his mouse over something, clicks something, etc.
Cgraz