I have to do this:
i want to throw an event to be captured in a frame, and then continue the
execution of the principal program:

public static void main(String[] args) {
boolean packFrame = false;
Util util = new Util();
JFrmIng frame = new JFrmIng();
if (packFrame)
frame.setVisible(true); //here the frame shows
//and here i want to wait until the user have clicked one of the buttons
//of the frame
if (frame.getverifypassword ()){
//here i call a method of frame that returns a boolean that means if the
//user have got access or not to the system

The problem is that when the frame shows the execution of the program continues
to validate the expression frame.getverifypassword and i want to wait until
one button had been clicked.

Thank you very much for your ideas,