Bourke
asked on
focusLost event
Hi,
I have a JTextField and when focusLost event is triggered it get details from the database and fill the other fields.
So there is a check there to make sure the JTextField is not empty to do so. That is grand but if focus is on this JTextField and I hit the canel button I get the message the JTextField cannot be empty.
Is there anyway to find out in the FocusLost if the next component to get the focus is a Cancel button?
Or is there another way to do this.
thanks
I have a JTextField and when focusLost event is triggered it get details from the database and fill the other fields.
So there is a check there to make sure the JTextField is not empty to do so. That is grand but if focus is on this JTextField and I hit the canel button I get the message the JTextField cannot be empty.
Is there anyway to find out in the FocusLost if the next component to get the focus is a Cancel button?
Or is there another way to do this.
thanks
Should the Cancel button be checking if any of the fields are empty if you are just cancelling the form?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sudhakar
The code you gave me above is what I have, but it made me re-look at my own code and found I should not have had a Dialog where it should not be.
Thanks for your help
The code you gave me above is what I have, but it made me re-look at my own code and found I should not have had a Dialog where it should not be.
Thanks for your help