If you want to validate input using a GUI, then you need to:
a) decide at which point validation should occur (for example, when the user pushes the "accept" button)
b) write an event handler for whichever GUI object gets the event (for example, the "accept" Jbutton)
Here's a good link about event handling in Java Swing:
http://download.oracle.com/javase/tu...nts/index.html